SVN r822
SVN-Revision: r822
This commit is contained in:
@@ -424,6 +424,8 @@ namespace Lskj.Business.Impl
|
||||
sumCond += ",a.PrivilegeView ";
|
||||
if (HasExistsColumn("p_systembillDetail", "PrivilegeOper"))
|
||||
sumCond += ",a.PrivilegeOper ";
|
||||
if (HasExistsColumn("p_systembillDetail", "ProhibitPaste"))
|
||||
sumCond += ",a.ProhibitPaste ";
|
||||
|
||||
string columsSql = string.Format(@"SELECT DISTINCT
|
||||
isnull(CASE WHEN ISNULL(b.userList,'')='' AND ISNULL(a.PrivilegeView,'')<>'' OR isnull(isVisible,0)=1 THEN 0 ELSE width END,0) width,
|
||||
|
||||
@@ -206,19 +206,19 @@ namespace Lskj.Business.Impl
|
||||
|
||||
beforePass = SHAHelper.EncryptPassword(beforePass);
|
||||
afterPass = SHAHelper.EncryptPassword(afterPass);
|
||||
|
||||
|
||||
|
||||
// 检查旧密码是否一致
|
||||
if (!password.Equals(beforePass)) return 2;
|
||||
|
||||
sqlValue = string.Format("update P_EmployeeTab set password='{0}' where EmployeeId='{1}' select @@ROWCOUNT", afterPass, userId);
|
||||
|
||||
if (BaseImpl.HasExistsColumn("P_EmployeeTab", "p_emp_password"))
|
||||
if (BaseImpl.HasExistsColumn("P_EmployeeTab", "p_emp_password"))
|
||||
{
|
||||
sqlValue = string.Format("update P_EmployeeTab set password='{0}',p_emp_password='{1}' where EmployeeId='{2}' select @@ROWCOUNT", afterPass, mdpassword, userId);
|
||||
}
|
||||
|
||||
|
||||
|
||||
DataTable dt = SqlHelper.ExecuteDataTable(sqlValue);
|
||||
int numberOfAffectedRows = dt != null && dt.Rows.Count > 0 ? int.Parse(dt.Rows[0][0] + "") : 0;
|
||||
return numberOfAffectedRows;
|
||||
@@ -447,7 +447,7 @@ namespace Lskj.Business.Impl
|
||||
{
|
||||
conditions = "and mestig=1";
|
||||
}
|
||||
|
||||
|
||||
|
||||
string sqlValue = string.Format("select EmployeeId UserId,LoginAccount UserCode,EmployeeName UserName {1} from P_EmployeeTab WHERE sign=0 and UseFlag=1 {0} order by loginaccount", conditions, fields);
|
||||
return SqlHelper.ExecuteDataTable(sqlValue);
|
||||
@@ -612,14 +612,14 @@ namespace Lskj.Business.Impl
|
||||
string countSql = string.Empty;
|
||||
if (SystemInfo.Instance.BillCornerMark && HasExistsColumn("P_systemdlltab", "countSql") && HasExistsColumn("p_systembilltype", "countSql"))
|
||||
{
|
||||
|
||||
|
||||
countSqlconditions = string.Format(@"left join P_systemdlltab e on a.PurviewId=e.DllCoid
|
||||
left join (
|
||||
select a.menuid as mkid , e.typecode ,countSql
|
||||
from p_formmenuconfigtab a
|
||||
left join p_systembilltype e on a.PurviewId=e.typecode
|
||||
where 1=1 {0}
|
||||
)x on a.menuid=x.mkid ", string.IsNullOrWhiteSpace(SystemInfo.Instance.DocumentQuantityLimit) ? "and DllFileName in ('Lskj.PubBill.dll')": SystemInfo.Instance.DocumentQuantityLimit);
|
||||
)x on a.menuid=x.mkid ", string.IsNullOrWhiteSpace(SystemInfo.Instance.DocumentQuantityLimit) ? "and DllFileName in ('Lskj.PubBill.dll')" : SystemInfo.Instance.DocumentQuantityLimit);
|
||||
countSql = "(select (CASE isnull(e.countSql,'') WHEN '' THEN (x.countSql) ELSE(e.countSql)END )) as'countSql',";//如果e.countSql为空,就用x.countSql,否则还是e.countSql
|
||||
}
|
||||
else if (HasExistsColumn("P_systemdlltab", "countSql"))
|
||||
@@ -1040,7 +1040,7 @@ namespace Lskj.Business.Impl
|
||||
where LinkModeTag=1
|
||||
order by grouptagid,ItemTagId ", ERPInfo.Instance.UserId);
|
||||
}
|
||||
|
||||
|
||||
return SqlHelper.ExecuteDataTable(sqlValue);
|
||||
}
|
||||
catch (Exception)
|
||||
@@ -1174,11 +1174,14 @@ namespace Lskj.Business.Impl
|
||||
{
|
||||
try
|
||||
{
|
||||
if (HasExistsTable("P_MacAddressTable"))
|
||||
if (SystemInfo.Instance.MacMandatoryJudgment)
|
||||
{
|
||||
DataTable table = SqlHelper.ExecuteDataTable(string.Format("select MacAddress from P_MacAddressTable where userid='{0}'", userId));
|
||||
DataRow dataRow = table != null && table.Rows.Count > 0 ? table.Rows[0] : null;
|
||||
if(SystemInfo.Instance.MacMandatoryJudgment&& dataRow==null) return false;
|
||||
if (dataRow != null&&!string.IsNullOrWhiteSpace(dataRow["MacAddress"] + ""))
|
||||
if (HasExistsTable("P_MacAddressTable"))
|
||||
{
|
||||
List<string> MacAddress = ((dataRow["MacAddress"] + "").Split(
|
||||
DataTable table = SqlHelper.ExecuteDataTable(string.Format("select MacAddress from P_MacAddressTable where userid='{0}'", userId));
|
||||
DataRow dataRow = table != null && table.Rows.Count > 0 ? table.Rows[0] : null;
|
||||
if (dataRow == null) return false;
|
||||
if (dataRow != null && !string.IsNullOrWhiteSpace(dataRow["MacAddress"] + ""))
|
||||
{
|
||||
List<string> MacAddress = ((dataRow["MacAddress"] + "").Split(',')).ToList();
|
||||
|
||||
@@ -163,7 +163,7 @@ namespace Lskj.Business.Impl
|
||||
new SqlParameter("@srcRowKey",SqlDbType.VarChar,50),
|
||||
new SqlParameter("@srcColKey",SqlDbType.VarChar,40),
|
||||
new SqlParameter("@dstModId",SqlDbType.VarChar,50),
|
||||
new SqlParameter("@dstRowKey",SqlDbType.VarChar,20),
|
||||
new SqlParameter("@dstRowKey",SqlDbType.VarChar,100),
|
||||
new SqlParameter("@dstColKey",SqlDbType.VarChar,500),
|
||||
new SqlParameter("@operatorid",SqlDbType.Int),
|
||||
new SqlParameter("@operatorname",SqlDbType.VarChar,50),
|
||||
@@ -180,7 +180,7 @@ namespace Lskj.Business.Impl
|
||||
new SqlParameter("@srcRowKey",SqlDbType.VarChar,50),
|
||||
new SqlParameter("@srcColKey",SqlDbType.VarChar,40),
|
||||
new SqlParameter("@dstModId",SqlDbType.VarChar,50),
|
||||
new SqlParameter("@dstRowKey",SqlDbType.VarChar,20),
|
||||
new SqlParameter("@dstRowKey",SqlDbType.VarChar,100),
|
||||
new SqlParameter("@dstColKey",SqlDbType.VarChar,500),
|
||||
new SqlParameter("@operatorid",SqlDbType.Int),
|
||||
new SqlParameter("@operatorname",SqlDbType.VarChar,50),
|
||||
@@ -243,26 +243,4 @@ namespace Lskj.Business.Impl
|
||||
new SqlParameter("@modid",SqlDbType.Int),
|
||||
new SqlParameter("@storehouseid",SqlDbType.Int),
|
||||
new SqlParameter("@uniqueCode",SqlDbType.VarChar,40),
|
||||
new SqlParameter("@mxid",SqlDbType.Int),
|
||||
new SqlParameter("@billtype",SqlDbType.VarChar,20),
|
||||
new SqlParameter("@productid",SqlDbType.VarChar,20),
|
||||
new SqlParameter("@operatorid",SqlDbType.Int),
|
||||
new SqlParameter("@operatorname",SqlDbType.VarChar,50),
|
||||
msg,
|
||||
returnValue
|
||||
};
|
||||
param[0].Value = primaryKey;
|
||||
param[1].Value = modid;
|
||||
param[2].Value = storehouseid;
|
||||
param[3].Value = uniqueCode;
|
||||
param[4].Value = mxid;
|
||||
param[5].Value = billtype;
|
||||
param[6].Value = productid;
|
||||
param[7].Value = ERPInfo.Instance.UserId;
|
||||
param[8].Value = ERPInfo.Instance.UserName;
|
||||
SqlHelper.ExecuteDataSet(CommandType.StoredProcedure, "BillTM_ADDPR", "temp", param);
|
||||
msgs = msg.Value + "";
|
||||
return Convert.ToInt32(returnValue.Value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -298,6 +298,7 @@ namespace Lskj.Business
|
||||
Instance.AccountSwitchingRestrictions = item.Table.Columns.Contains("AccountSwitchingRestrictions") && !string.IsNullOrEmpty(item["AccountSwitchingRestrictions"] + "") ? Convert.ToInt32(item["AccountSwitchingRestrictions"] + "") : 0;
|
||||
Instance.Bill_cg_showname = item.Table.Columns.Contains("bill_cg_showname") && !string.IsNullOrEmpty(item["bill_cg_showname"] + "") ? item["bill_cg_showname"] + "" : "";
|
||||
if (!string.IsNullOrWhiteSpace(Instance.Bill_cg_showname)) ERPInfo.Instance.DraftReplacementValue = Instance.Bill_cg_showname;
|
||||
Instance.HideFixedConditions = item.Table.Columns.Contains("HideFixedConditions") && !string.IsNullOrEmpty(item["HideFixedConditions"] + "") ? "1".Equals(item["HideFixedConditions"] + "") : false;
|
||||
}
|
||||
/// <summary>
|
||||
/// 高拍仪AccessKey
|
||||
@@ -966,4 +967,9 @@ namespace Lskj.Business
|
||||
/// </summary>
|
||||
public bool SplitOrderNewVer;
|
||||
/// <summary>
|
||||
|
||||
/// 报错时不提示具体sql信息
|
||||
/// </summary>
|
||||
public bool HideErrorSQL;
|
||||
/// <summary>
|
||||
/// 表格快速导入
|
||||
/
|
||||
Reference in New Issue
Block a user