예제 #1
0
        public bool ModifyDepartment(int iDeptCode, string strDeptName, int iNumber, int iUpDeptCode, string strDeptCode)
        {
            string str = "";

            strDeptName = PublicClass.CheckString(strDeptName);
            strDeptCode = PublicClass.CheckString(strDeptCode);
            string    str3           = "";
            DataTable deptmentDetail = this.GetDeptmentDetail(iUpDeptCode);

            if (deptmentDetail.Rows.Count > 0)
            {
                str = deptmentDetail.Rows[0]["v_bmqc"].ToString() + @"\" + strDeptName;
                DataTable table2 = this.GetDeptmentDetail(iDeptCode);
                if (table2.Rows.Count > 0)
                {
                    str3 = table2.Rows[0]["v_bmqc"].ToString();
                }
            }
            else
            {
                this._messageString = "取得部门新全称出错!";
                return(false);
            }
            this.GetDeptmentDetail(iDeptCode).Rows[0]["v_bmmc"].ToString();
            string str4 = "begin update pt_d_bm set v_bmmc='" + strDeptName + "',v_bmqc='" + str + "',v_bmjx='" + strDeptCode + "',i_xh=" + iNumber.ToString() + " where i_bmdm = " + iDeptCode.ToString() + ";";

            if (publicDbOpClass.NonQuerySqlString((str4 + " insert into  pt_RtxDeptInit (InitState,Dept,ParentDept)values('1','" + strDeptName + "','" + str3 + "')") + " end"))
            {
                return(true);
            }
            this._messageString = "部门更新失败!";
            return(false);
        }
예제 #2
0
        public int BidScheduleAdd(WBSBidTask bid)
        {
            bid.TaskCode = PublicClass.CheckString(bid.TaskCode);
            string str2 = (" begin " + " insert into EPM_Task_TaskList(ParentTaskCode,TaskCode,TaskName,") + " Quantity,QuantityUnit,ChildNum,ProjectCode,WorkLayer,IsValid,Cost,SynthPrice, " + " StartDate,EndDate,Remark,WbsType,ContractPrice)";
            object obj2 = (((((str2 + " values('" + bid.ParentTaskCode + "','" + bid.TaskCode + "','" + bid.TaskName + "',") + bid.Quantity.ToString() + ",") + "'" + bid.QuantityUnit + "',") + "0,") + "'" + bid.ProjectCode.ToString() + "',") + ((bid.TaskCode.Length / 3)).ToString() + ",";
            string str3 = string.Concat(new object[] { obj2, "1,0,", bid.SynthPrice.ToString(), ",'", bid.StartDate, "','", bid.EndDate, "','", bid.Remark, "','", bid.WbsType.ToString(), "',", bid.SynthPrice.ToString(), ")" });

            return(publicDbOpClass.ExecSqlString((str3 + " update EPM_Task_TaskList set ChildNum = ChildNum + 1 where ProjectCode = '" + bid.ProjectCode.ToString() + "' and TaskCode = '" + bid.ParentTaskCode + "' and IsValid = 1 and WbsType=" + bid.WbsType.ToString()) + " end "));
        }
예제 #3
0
        public static bool UpdModule(string mkdm, string mkmc, string cdlj, int xh, string img, string strBasic, string strMaintainable, string helpPath)
        {
            string str = "";

            mkmc = PublicClass.CheckString(mkmc);
            cdlj = PublicClass.CheckString(cdlj);
            str  = " begin ";
            string str2 = str;

            return(publicDbOpClass.NonQuerySqlString((((str2 + " update pt_mk set v_mkmc='" + mkmc + "',v_cdlj='" + cdlj + "',i_xh=" + xh.ToString() + ",v_img='" + img + "',IsBasic='" + strBasic + "',IsMaintainable='" + strMaintainable + "',helpPath='" + helpPath + "' where c_mkdm='" + mkdm + "' ") + " update pt_role_privilege set IsBasic = '" + strBasic + "' ") + " update pt_yhmc_privilege set IsBasic = '" + strBasic + "' ") + " end "));
        }
예제 #4
0
        public bool AddDepart(string strDeptName, int iNumber, int iUpDeptCode, string strBMBM)
        {
            string str  = "";
            int    num  = 0;
            int    num2 = 0;

            strDeptName = PublicClass.CheckString(strDeptName);
            string    str2           = "01";
            DataTable deptmentDetail = this.GetDeptmentDetail(iUpDeptCode);

            if (deptmentDetail.Rows.Count > 0)
            {
                str = deptmentDetail.Rows[0]["v_bmqc"].ToString();
                num = Convert.ToInt32(deptmentDetail.Rows[0]["i_jb"].ToString());
                string deptCode = deptmentDetail.Rows[0]["i_bmdm"].ToString();
                long   subMax   = this.GetSubMax(deptCode);
                if (deptmentDetail.Rows[0]["i_sjdm"].ToString() != "0")
                {
                    strBMBM = deptmentDetail.Rows[0]["CorpCode"].ToString();
                    string str4 = subMax.ToString().PadLeft(2, '0');
                    int    num4 = Convert.ToInt32(str4.Substring(str4.Length - 2, 2)) + 1;
                    str4 = num4.ToString().PadLeft(2, '0');
                    str2 = deptmentDetail.Rows[0]["v_bmbm"].ToString() + str4;
                }
                else
                {
                    long num5 = subMax + 1L;
                    str2 = num5.ToString().PadLeft(2, '0');
                }
            }
            else
            {
                this._messageString = "上级部门不存在,部门增加失败!";
                return(false);
            }
            string str5 = str;

            str  = str + @"\" + strDeptName;
            num2 = Convert.ToInt32(publicDbOpClass.QuaryMaxid("pt_d_bm", "i_bmdm")) + 1;
            num++;
            string str7 = "";
            string str8 = str7 + " begin insert into pt_d_bm (i_bmdm,CorpCode,v_bmmc,v_bmqc,i_xh,i_sjdm,i_xjbm,i_jb,c_sfyx,v_bmbm) values(" + num2.ToString() + ",'" + strBMBM + "','" + strDeptName + "','" + str + "'," + iNumber.ToString() + "," + iUpDeptCode.ToString() + ",0," + num.ToString() + ",'y','" + str2 + "');";
            string str9 = str8 + " insert into  pt_RtxDeptInit (InitState,Dept,ParentDept)values('0','" + strDeptName + "','" + str5 + "')";

            if (publicDbOpClass.NonQuerySqlString((str9 + " update pt_d_bm set i_xjbm = (select count(1) from pt_d_bm where (i_sjdm=" + iUpDeptCode.ToString() + ")and(c_sfyx='y')) where i_bmdm = " + iUpDeptCode.ToString() + ";") + " end"))
            {
                return(true);
            }
            this._messageString = "部门增加失败!";
            return(false);
        }
예제 #5
0
        public bool userAdd(string dlid, string yhmc, string yhmm, string bmid, string zwbm, int yxdx, int yjsl, string jsdm)
        {
            int num;

            dlid = PublicClass.CheckString(dlid);
            yhmc = PublicClass.CheckString(yhmc);
            yhmm = PublicClass.CheckString(yhmm);
            yhmm = FormsAuthentication.HashPasswordForStoringInConfigFile(yhmm, "md5");
            new ChineseToSpell().WordToSpell(yhmc);
            bmid = bmid.PadLeft(3, '0');
            string str2 = publicDbOpClass.DataTableQuary("select max(v_yhdm)+1 as yhdm from pt_yhmc where v_yhdm like '" + bmid + "%'").Rows[0]["yhdm"].ToString();

            if (str2.Length == 0)
            {
                num  = 1;
                str2 = bmid + "00001";
            }
            else
            {
                num  = Convert.ToInt32(str2.Substring(str2.Length - 5, 5));
                str2 = bmid + str2.Substring(str2.Length - 5, 5);
            }
            DataTable table2    = new roleManageDb().roleQuary(jsdm);
            string    str3      = table2.Rows[0]["v_bgfw"].ToString();
            string    str4      = table2.Rows[0]["v_xtqx"].ToString();
            string    sqlString = "begin ";
            object    obj2      = sqlString;
            string    str5      = string.Concat(new object[] { obj2, " insert into pt_yhmc (v_yhdm,v_xm,i_bmdm,c_sfyx,i_xh,i_dutyID) values ('", str2, "','", yhmc, "',", Convert.ToInt32(bmid), ",'y',", num, ",", Convert.ToInt32(zwbm), ")" }) + " insert into pt_login (v_dlid,v_yhdm,v_dlmm,v_bgfw,c_jsdm,v_xtqx,c_sfyx) values ('" + dlid + "',";

            sqlString = (str5 + "'" + str2 + "','" + yhmm + "','" + str3 + "','" + jsdm + "','" + str4 + "','y')") + " end;";
            bool flag = true;

            try
            {
                flag = publicDbOpClass.NonQuerySqlString(sqlString);
                if (flag)
                {
                    return(true);
                }
                this._messageString = "添加新用户出错,可能是登录id已存在,操作失败!";
                flag = false;
            }
            catch (InvalidCastException exception)
            {
                this._messageString = exception.Message;
            }
            return(flag);
        }
예제 #6
0
        public static bool AddModule(string mkdm, string mkmc, string cdlj, int xh, string img, string strBasic, string strMaintainable, string helpPath)
        {
            mkmc = PublicClass.CheckString(mkmc);
            cdlj = PublicClass.CheckString(cdlj);
            string str  = (Convert.ToInt32(publicDbOpClass.QuaryMaxid("pt_mk", "I_ID")) + 1).ToString();
            string str2 = "";

            str2 = " begin ";
            object obj2 = str2;
            string str3 = string.Concat(new object[] {
                obj2, " insert into pt_mk (c_mkdm,v_mkmc,v_cdlj,c_bs,i_xh,i_id,v_img,i_childnum,IsBasic,IsMaintainable,helpPath) values ('", mkdm, "','", mkmc, "','", cdlj, "','y',", xh, ",", str, ",'", img, "',0,'", strBasic, "','",
                strMaintainable, "','", helpPath, "')"
            });

            return(publicDbOpClass.NonQuerySqlString((str3 + " update pt_mk set i_childNum = (select count(1) from pt_mk where (c_mkdm like '" + mkdm.Substring(0, mkdm.Length - 2) + "%') and (len(c_mkdm)= " + mkdm.Length.ToString() + ")) where c_mkdm = '" + mkdm.Substring(0, mkdm.Length - 2) + "'") + " end"));
        }
예제 #7
0
        public bool roleMod(string RoleCode, string RoleName)
        {
            bool flag = true;

            RoleName = PublicClass.CheckString(RoleName);
            string sqlString = "update pt_Role set RoleName='" + RoleName + "' where RoleCode='" + RoleCode + "'";

            try
            {
                publicDbOpClass.NonQuerySqlString(sqlString);
            }
            catch
            {
                flag = false;
            }
            return(flag);
        }
예제 #8
0
        public bool userMod(string yhdm, string yhmc, string mmFlag, string RoleCodes, string IsManager, string MailSpace, bool isChange)
        {
            string[] strArray5;
            yhmc = PublicClass.CheckString(yhmc);
            string str = FormsAuthentication.HashPasswordForStoringInConfigFile("easy", "md5");

            string[] sqlString = new string[2];
            sqlString[0] = "update pt_login set RoleCodes = '" + RoleCodes + "',IsManager = '" + IsManager + "',MailSpace='" + MailSpace + "'";
            if (mmFlag == "y")
            {
                string[] strArray3;
                (strArray3 = sqlString)[0] = strArray3[0] + " ,v_dlmm = '" + str + "'";
            }
            if (isChange)
            {
                string[] strArray4;
                (strArray4 = sqlString)[0] = strArray4[0] + " ,AuditPwd = 'easy'";
            }
            (strArray5 = sqlString)[0] = strArray5[0] + " where v_yhdm = '" + yhdm + "'";
            sqlString[1] = " exec P_Plat_UpdUserPriv '" + yhdm + "','" + RoleCodes + "'";
            bool flag = true;

            try
            {
                flag = publicDbOpClass.ExecuteSQL(sqlString);
                if (flag)
                {
                    if (mmFlag == "y")
                    {
                        this.InsertRTXSynchronizationPwd(yhdm, "easy");
                    }
                    return(true);
                }
                this._messageString = "修改用户出错,可能是登录id已存在,操作失败!";
                flag = false;
            }
            catch (InvalidCastException exception)
            {
                this._messageString = exception.Message;
            }
            return(flag);
        }
예제 #9
0
파일: PMAction.cs 프로젝트: zxl881203/src
        public static bool UpdPrjInfo(string TypeCode, string UserCode, string RecordDate, PMModel PIM)
        {
            string str = "";

            TypeCode = PublicClass.CheckString(TypeCode);
            str      = " begin ";
            string str2 = str;
            object obj2 = str2 + " update PT_PrjInfo set UserCode='" + UserCode + "',RecordDate ='" + RecordDate + "',";
            string str3 = string.Concat(new object[] {
                obj2, "PrjName='", PIM.PrjName, "',StartDate = '", PIM.StartDate, "',EndDate = '", PIM.EndDate, "',ComputeClass = '", PIM.ComputeClass, "',RationClass ='", PIM.RationClass, "',PrjCost ='", PIM.PrjCost, "',ContractSum = '", PIM.ContractSum, "',Duration = '",
                PIM.Duration, "',"
            });
            string str4 = str3 + "QualityClass =  '" + PIM.QualityClass + "',Area = '" + PIM.Area + "',PrjKindClass = '" + PIM.PrjKindClass + "',PrjPlace = '" + PIM.PrjPlace + "',Remark1 = '" + PIM.Remark + "',";
            object obj3 = str4 + "FileName = '" + PIM.FileName + "',FileURL = '" + PIM.FileURL + "',Owner =  '" + PIM.Owner + "',Counsellor = '" + PIM.Counsellor + "',Designer = '" + PIM.Designer + "',";
            string str5 = string.Concat(new object[] { obj3, "[Inspector] =  '", PIM.Inspector, "',[PrjInfo] = '", PIM.PrjInfo, "',[PrjState] = '", PIM.PrjState, "',[OwnerCode] = '", PIM.OwnerCode, "',[MarketInfoGuid] = '", Guid.Empty, "'," });
            string str6 = str5 + "[Rank] = '" + PIM.Rank + "',[BudgetWay] = '" + PIM.BudgetWay + "',[ContractWay] = '" + PIM.ContractWay + "',[PayCondition] = '" + PIM.PayCondition + "',[TenderWay] ='" + PIM.TenderWay + "',";
            string str7 = str6 + "[PayWay] = '" + PIM.PayWay + "',[KeyPart] = '" + PIM.KeyPart + "',[WorkUnit] = '" + PIM.WorkUnit + "',[LinkMan] = '" + PIM.LinkMan + "',[PrjManager] = '" + PIM.PrjManager + "',";
            string str8 = str7 + "[BuildingType] = '" + PIM.BuildingType + "',[TotalHouseNum] = '" + PIM.TotalHouseNum + "',[BuildingArea] =  '" + PIM.BuildingArea + "',[UsegrounArea] = '" + PIM.UsegrounArea + "',";

            return(publicDbOpClass.NonQuerySqlString(((str8 + "UndergroundArea = '" + PIM.UndergroundArea + "',PrjFundInfo = '" + PIM.PrjFundInfo + "',OtherStatement = '" + PIM.OtherStatement + "',xmgroup='" + PIM.Xmgroup + "'") + "  where TypeCode='" + TypeCode + "'") + " end "));
        }
예제 #10
0
파일: PMAction.cs 프로젝트: zxl881203/src
        public static bool AddPrjInfo(string TypeCode, string UserCode, string RecordDate, PMModel PIM, string podepom)
        {
            TypeCode = PublicClass.CheckString(TypeCode);
            int    num   = int.Parse(publicDbOpClass.QuaryMaxid("PT_PrjInfo", "i_XH")) + 1;
            string str2  = (" begin " + " insert into PT_PrjInfo (TypeCode,i_xh,UserCode,RecordDate,IsValid ,i_childNum,PrjCode,PrjGuid,PrjName,StartDate,EndDate," + "ComputeClass,RationClass,PrjCost,ContractSum,Duration,QualityClass,Area,PrjKindClass,PrjPlace,Remark1,FileName,FileURL,") + "Owner,Counsellor,Designer,Inspector,PrjInfo,PrjState,OwnerCode,MarketInfoGuid,Rank,BudgetWay,ContractWay,PayCondition,TenderWay,PayWay," + "KeyPart,WorkUnit,LinkMan,PrjManager,BuildingType,TotalHouseNum,BuildingArea,UsegrounArea,UndergroundArea,PrjFundInfo,OtherStatement,xmgroup,Podepom";
            object obj2  = str2 + " ) values ('" + TypeCode + "'," + num.ToString() + ",'" + UserCode + "','" + RecordDate + "','1',0,";
            object obj3  = string.Concat(new object[] { obj2, " '", PIM.PrjCode, "','", PIM.PrjGuid, "','", PIM.PrjName, "','", PIM.StartDate, "', " });
            string str3  = string.Concat(new object[] { obj3, " '", PIM.EndDate, "','", PIM.ComputeClass, "','", PIM.RationClass, "', " });
            string str4  = str3 + " '" + PIM.PrjCost + "','" + PIM.ContractSum + "','" + PIM.Duration + "', ";
            string str5  = str4 + " '" + PIM.QualityClass + "','" + PIM.Area + "','" + PIM.PrjKindClass + "', ";
            string str6  = str5 + " '" + PIM.PrjPlace + "','" + PIM.Remark + "','" + PIM.FileName + "','" + PIM.FileURL + "' ,";
            object obj4  = str6 + " '" + PIM.Owner + "','" + PIM.Counsellor + "','" + PIM.Designer + "',";
            string str7  = string.Concat(new object[] { obj4, " '", PIM.Inspector, "','", PIM.PrjInfo, "','", PIM.PrjState, "','", PIM.OwnerCode, "','", Guid.Empty, "'," });
            string str8  = str7 + " '" + PIM.Rank + "','" + PIM.BudgetWay + "','" + PIM.ContractWay + "',";
            string str9  = str8 + " '" + PIM.PayCondition + "','" + PIM.TenderWay + "','" + PIM.PayWay + "',";
            string str10 = str9 + " '" + PIM.KeyPart + "','" + PIM.WorkUnit + "','" + PIM.LinkMan + "',";
            string str11 = str10 + " '" + PIM.PrjManager + "','" + PIM.BuildingType + "','" + PIM.TotalHouseNum + "',";
            string str12 = str11 + " '" + PIM.BuildingArea + "','" + PIM.UsegrounArea + "','" + PIM.UndergroundArea + "',";
            object obj5  = (str12 + " '" + PIM.PrjFundInfo + "','" + PIM.OtherStatement + "','" + PIM.Xmgroup + "','" + podepom + "'") + "\t)";
            string str13 = string.Concat(new object[] { obj5, " INSERT INTO PT_PrjInfo_ZTB_Detail(PrjGuid,IsTender,SetUpFlowState) VALUES('", PIM.PrjGuid, "', '0', '1')" });

            return(publicDbOpClass.NonQuerySqlString((str13 + " update PT_PrjInfo set i_childNum = (select count(1) from PT_PrjInfo where (TypeCode like '" + TypeCode.Substring(0, TypeCode.Length - 5) + "%') and (len(TypeCode)= " + TypeCode.Length.ToString() + ")) where TypeCode = '" + TypeCode.Substring(0, TypeCode.Length - 5) + "'") + " end"));
        }
예제 #11
0
 public DataTable userLoginQuaryDt(string dlid)
 {
     dlid = PublicClass.CheckString(dlid);
     return(publicDbOpClass.DataTableQuary("SELECT pt_login.*,pt_yhmc.v_xm FROM pt_login,pt_yhmc WHERE pt_login.v_dlid='" + dlid + "' and pt_login.v_yhdm=pt_yhmc.v_yhdm and pt_login.c_sfyx = 'y'"));
 }
예제 #12
0
 public void UserlLoginInfo(string ipdz, string yhdm)
 {
     ipdz = PublicClass.CheckString(ipdz);
     publicDbOpClass.NonQuerySqlString("insert into pt_xtrz (v_yhdm,v_dlip,dtm_dlsj) values('" + yhdm + "','" + ipdz + "',getdate())");
 }