|
|
@@ -388,12 +388,12 @@ namespace UAS_MES.PublicMethod
|
|
|
{
|
|
|
oErrorMessage = "";
|
|
|
iUserCode = iUserCode.ToUpper();
|
|
|
- string SQL = "select em_code,em_type,em_name from employee where upper(em_code)=:UserName ";
|
|
|
+ iSourceCode = iSourceCode.ToUpper();
|
|
|
+ string SQL = "select em_code,em_type from employee where upper(em_code)=:UserName ";
|
|
|
DataTable dt;
|
|
|
dt = (DataTable)dh.ExecuteSql(SQL, "select", iUserCode);
|
|
|
if (dt.Rows.Count > 0)
|
|
|
{
|
|
|
- string em_name = dt.Rows[0]["em_name"].ToString();
|
|
|
string em_type = dt.Rows[0]["em_type"].ToString();
|
|
|
if (iSourceCode == "")
|
|
|
{
|
|
|
@@ -402,7 +402,7 @@ namespace UAS_MES.PublicMethod
|
|
|
}
|
|
|
if (em_type == "admin")
|
|
|
{
|
|
|
- if (dh.CheckExist("Source", "upper(sc_code)='" + iSourceCode.ToUpper() + "' and sc_statuscode='AUDITED'"))
|
|
|
+ if (dh.CheckExist("Source", "upper(sc_code)='" + iSourceCode + "' and sc_statuscode='AUDITED'"))
|
|
|
{
|
|
|
return true;
|
|
|
}
|
|
|
@@ -414,7 +414,7 @@ namespace UAS_MES.PublicMethod
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- dt = dh.getFieldsDatasByCondition("cs$empgroup left join cs$userresource on ur_groupcode=eg_groupcode left join source on ur_resourcecode=sc_code", new string[] { "ur_resourcecode" }, "upper(eg_emcode)= '" + iUserCode + "' and sc_statuscode='AUDITED'");
|
|
|
+ dt = dh.getFieldsDatasByCondition("cs$empgroup left join cs$userresource on ur_groupcode=eg_groupcode left join source on ur_resourcecode=sc_code", new string[] { "upper(ur_resourcecode) ur_resourcecode" }, "upper(eg_emcode)= '" + iUserCode + "' and sc_statuscode='AUDITED'");
|
|
|
//如果存在该编号
|
|
|
if (dt.Rows.Count > 0)
|
|
|
{
|