예제 #1
0
        public void CreateUser(string sUserCode, string sUserName, string sDefaultEntity, string sDefaultBranchCode, string sDefaultDeptCode, string sPassword, string sLocked, string sDefaultApprovalLevel, string sApprovalScope, string sLanguage)
        {
            string sCompany = string.Empty;
            string sResult  = string.Empty;

            sFuncName = "CreateUser";

            try
            {
                oLog.WriteToDebugLogFile("Create New User Function", sFuncName);

                sSQL = string.Format("call \"AE_SP003_CREATEUSER\"('" + sUserCode + "','" + sUserName + "','" + sDefaultEntity + "','" + sDefaultBranchCode + "','" + sDefaultDeptCode + "','" + sPassword + "','" + sLocked + "','" + sDefaultApprovalLevel + "','" + sApprovalScope + "','" + sLanguage + "')");

                oLog.WriteToDebugLogFile("Execute SQL" + sSQL, sFuncName);
                OdbcParameter[] Param = new OdbcParameter[0];
                oCommon.ExecuteQuery(sSQL, sCompany, Param);

                oLog.WriteToDebugLogFile("Ending Function", sFuncName);
            }
            catch (Exception ex)
            {
                sErrDesc = ex.Message.ToString();
                oLog.WriteToErrorLogFile(sErrDesc, sFuncName);
                oLog.WriteToDebugLogFile("Completed With ERROR  ", sFuncName);
                result objResult = new result();
                objResult.Result         = "Error";
                objResult.DisplayMessage = sErrDesc;
                lstResult.Add(objResult);
                Context.Response.Output.Write(js.Serialize(lstResult));
            }
        }