Exemple #1
0
    public void bindPagedata()
    {
        PMModel pIM = new PMModel();

        pIM = PMAction.GetSingleInfo(this.tpcode);
        this.TextBind(pIM);
    }
Exemple #2
0
        public static PMModel GetSingleInfoByPrjGuid(string PrjGuid)
        {
            PMModel model = new PMModel();

            foreach (DataRow row in GetSingleByPrjGuid(PrjGuid).Rows)
            {
                model.PrjCode = row["PrjCode"].ToString();
                if (row["PrjGuid"].ToString() != "")
                {
                    model.PrjGuid = new Guid(row["PrjGuid"].ToString());
                }
                model.PrjName = row["PrjName"].ToString();
                try
                {
                    model.StartDate = (DateTime)row["StartDate"];
                    model.EndDate   = (DateTime)row["EndDate"];
                }
                catch (Exception)
                {
                }
                model.ComputeClass    = row["ComputeClass"].ToString();
                model.RationClass     = row["RationClass"].ToString();
                model.PrjCost         = row["PrjCost"].ToString();
                model.ContractSum     = row["ContractSum"].ToString();
                model.Duration        = row["Duration"].ToString();
                model.QualityClass    = row["QualityClass"].ToString();
                model.Area            = row["Area"].ToString();
                model.PrjKindClass    = row["PrjKindClass"].ToString();
                model.PrjPlace        = row["PrjPlace"].ToString();
                model.Remark          = row["Remark1"].ToString();
                model.FileName        = row["FileName"].ToString();
                model.FileURL         = row["FileURL"].ToString();
                model.Owner           = row["Owner"].ToString();
                model.Counsellor      = row["Counsellor"].ToString();
                model.Designer        = row["Designer"].ToString();
                model.Inspector       = row["Inspector"].ToString();
                model.PrjInfo         = row["PrjInfo"].ToString();
                model.PrjState        = row["PrjState"].ToString();
                model.OwnerCode       = row["OwnerCode"].ToString();
                model.Rank            = row["Rank"].ToString();
                model.BudgetWay       = row["BudgetWay"].ToString();
                model.ContractWay     = row["ContractWay"].ToString();
                model.PayCondition    = row["PayCondition"].ToString();
                model.TenderWay       = row["TenderWay"].ToString();
                model.PayWay          = row["PayWay"].ToString();
                model.KeyPart         = row["KeyPart"].ToString();
                model.WorkUnit        = row["WorkUnit"].ToString();
                model.LinkMan         = row["LinkMan"].ToString();
                model.PrjManager      = row["PrjManager"].ToString();
                model.BuildingType    = row["BuildingType"].ToString();
                model.TotalHouseNum   = row["TotalHouseNum"].ToString();
                model.BuildingArea    = row["BuildingArea"].ToString();
                model.UsegrounArea    = row["UsegrounArea"].ToString();
                model.UndergroundArea = row["UndergroundArea"].ToString();
                model.PrjFundInfo     = row["PrjFundInfo"].ToString();
                model.OtherStatement  = row["OtherStatement"].ToString();
                model.Xmgroup         = row["xmgroup"].ToString();
            }
            return(model);
        }
Exemple #3
0
    private PMModel GetTextValue()
    {
        PMModel pMModel = new PMModel();

        pMModel.PrjCode      = this.txt_PrjCode.Text;
        pMModel.PrjGuid      = new System.Guid(this.hdfGuid.Value.ToString());
        pMModel.PrjName      = this.txt_PrjName.Text.Trim();
        pMModel.StartDate    = System.Convert.ToDateTime(this.txt_StartDate.Text);
        pMModel.EndDate      = System.Convert.ToDateTime(this.txt_EndDate.Text);
        pMModel.ComputeClass = "1";
        if (this.txt_PrjCost.Text.Trim().Length > 0)
        {
            pMModel.PrjCost = this.txt_PrjCost.Text;
        }
        else
        {
            pMModel.PrjCost = "0";
        }
        if (this.txt_Duration.Text.Trim().Length > 0)
        {
            pMModel.Duration = this.txt_Duration.Text;
        }
        else
        {
            pMModel.Duration = "0";
        }
        pMModel.QualityClass    = this.drop_QualityClass.SelectedValue;
        pMModel.PrjKindClass    = this.drop_PrjKindClass.SelectedValue;
        pMModel.Area            = this.ddt_Area.SelectedValue;
        pMModel.Remark          = this.txt_Remark.Text;
        pMModel.Owner           = this.txt_Owner.Value;
        pMModel.Counsellor      = this.txt_Counsellor.Text;
        pMModel.Designer        = this.txt_Designer.Text;
        pMModel.Inspector       = this.txt_Inspector.Text;
        pMModel.PrjInfo         = this.txt_PrjInfo.Text;
        pMModel.PrjState        = this.ddt_state.SelectedValue;
        pMModel.OwnerCode       = this.HdnOwnerCode.Value;
        pMModel.PrjPlace        = this.txt_PrjPlace.Text.Trim();
        pMModel.Rank            = this.drop_zzGrade.SelectedValue;
        pMModel.BudgetWay       = this.drop_ysType.SelectedValue;
        pMModel.ContractWay     = this.drop_cbType.SelectedValue;
        pMModel.PayCondition    = this.drop_Payment.SelectedValue;
        pMModel.TenderWay       = this.drop_zbType.SelectedValue;
        pMModel.PayWay          = this.drop_jsType.SelectedValue;
        pMModel.KeyPart         = this.drop_PrimaryGrade.SelectedValue;
        pMModel.WorkUnit        = this.Txt_WorkUnit.Value;
        pMModel.LinkMan         = this.Txt_LinkMan.Text;
        pMModel.PrjManager      = this.ManagerCode.Value.Trim().ToString() + "-" + this.Txt_PrjManager.Value;
        pMModel.BuildingType    = this.drop_jzType.SelectedValue;
        pMModel.TotalHouseNum   = this.Txt_TotalHouseNum.Text;
        pMModel.BuildingArea    = this.Txt_BuildingArea.Text;
        pMModel.UsegrounArea    = this.Txt_UsegrounArea.Text;
        pMModel.UndergroundArea = this.Txt_UndergroundArea.Text;
        pMModel.PrjFundInfo     = this.Txt_PrjFundInfo.Text;
        pMModel.OtherStatement  = this.Txt_OtherStatement.Text;
        pMModel.Xmgroup         = this.ddlXmgroup.SelectedValue.ToString();
        return(pMModel);
    }
Exemple #4
0
 protected void Page_Load(object sender, System.EventArgs e)
 {
     base.Response.Cache.SetNoStore();
     if (!this.Page.IsPostBack)
     {
         PMModel pMModel = new PMModel();
         pMModel             = PMAction.GetSingleInfo(base.Request.QueryString["subpc"]);
         this.lbPrjName.Text = pMModel.PrjName;
         this.FillTrees1.Nodes.Clear();
         this.TVDept_AppendNodeFill();
     }
 }
        public void TestFixtureSetup()
        {
            _powerMill = new PMAutomation(InstanceReuse.UseExistingInstance);
            _powerMill.DialogsOff();
            _powerMill.CloseProject();

            var tempFolder = Directory.CreateTemporaryDirectory();

            TestFiles.SimplePmProject1.Copy(tempFolder);
            _powerMill.LoadProject(tempFolder);
            _tempFoldersToDelete.Add(tempFolder);

            _defaultModel = _powerMill.ActiveProject.Models[0];
        }
Exemple #6
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!base.IsPostBack)
     {
         this.TemGID = Guid.NewGuid().ToString();
         string    text      = this.Session["yhdm"].ToString();
         DataTable dataTable = PersonnelAction.QueryPersonnelById(text);
         if (dataTable != null && dataTable.Rows.Count == 1)
         {
             this.Session["HumanName"] = dataTable.Rows[0]["v_xm"].ToString();
         }
         this.Session["HumanCode"] = text;
         if (this._Action == "edit")
         {
             this.FileLink1.Type = 1;
             this.FileLink1.FID  = this._Ic;
             this.ToInitialize();
             return;
         }
         if (this._Action == "add")
         {
             this.FileLink1.Type = 2;
             this.FileLink1.FID  = this.TemGID.ToString();
             if (this._PrjCode != "" && this._PrjCode.Length == 36)
             {
                 PMModel pMModel = new PMModel();
                 pMModel = PMAction.GetSingleInfoByPrjGuid(this._PrjCode);
                 if (pMModel != null)
                 {
                     this.txtaccountNum.Value = pMModel.PrjCode;
                     this.txtacountName.Value = pMModel.PrjName;
                     return;
                 }
             }
         }
         else
         {
             this.FileLink1.Type = 0;
             this.FileLink1.FID  = this._Ic;
             this.ToInitialize();
             this.initSate();
         }
     }
 }
 public PMViewModel()
 {
     pMModel         = new PMModel();
     pMModel.Message = "This is Test";
 }
Exemple #8
0
        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 "));
        }
Exemple #9
0
        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"));
        }
Exemple #10
0
 private void TextBind(PMModel PIM)
 {
     this.txt_PrjCode.Text                = PIM.PrjCode;
     this.ViewState["oldPrjcode"]         = this.txt_PrjCode.Text;
     this.txt_PrjName.Text                = PIM.PrjName;
     this.hdfGuid.Value                   = PIM.PrjGuid.ToString();
     this.txt_StartDate.Text              = PIM.StartDate.ToString("yyyy-MM-dd");
     this.txt_EndDate.Text                = PIM.EndDate.ToString("yyyy-MM-dd");
     this.txt_PrjCost.Text                = PIM.PrjCost;
     this.txt_Duration.Text               = PIM.Duration.ToString();
     this.drop_QualityClass.SelectedValue = PIM.QualityClass;
     this.drop_PrjKindClass.SelectedValue = PIM.PrjKindClass;
     this.ddt_state.SelectedValue         = PIM.PrjState;
     this.HdnOwnerCode.Value              = PIM.OwnerCode;
     try
     {
         this.ddt_Area.SelectedValue = PIM.Area;
     }
     catch
     {
     }
     this.txt_Remark.Text                 = PIM.Remark;
     this.txt_Owner.Value                 = PIM.Owner;
     this.txt_Counsellor.Text             = PIM.Counsellor;
     this.txt_Designer.Text               = PIM.Designer;
     this.txt_Inspector.Text              = PIM.Inspector;
     this.txt_PrjInfo.Text                = PIM.PrjInfo;
     this.ddt_state.SelectedValue         = PIM.PrjState;
     this.txt_PrjPlace.Text               = PIM.PrjPlace;
     this.drop_zzGrade.SelectedValue      = PIM.Rank;
     this.drop_ysType.SelectedValue       = PIM.BudgetWay;
     this.drop_cbType.SelectedValue       = PIM.ContractWay;
     this.drop_Payment.SelectedValue      = PIM.PayCondition;
     this.drop_zbType.SelectedValue       = PIM.TenderWay;
     this.drop_jsType.SelectedValue       = PIM.PayWay;
     this.drop_PrimaryGrade.SelectedValue = PIM.KeyPart;
     this.Txt_WorkUnit.Value              = PIM.WorkUnit;
     this.Txt_LinkMan.Text                = PIM.LinkMan;
     if (PIM.PrjManager.ToString().Length > 8)
     {
         this.Txt_PrjManager.Value = PIM.PrjManager.Substring(9);
         this.ManagerCode.Value    = PIM.PrjManager.Substring(0, 8);
     }
     this.drop_jzType.SelectedValue = PIM.BuildingType;
     this.Txt_TotalHouseNum.Text    = PIM.TotalHouseNum;
     this.Txt_BuildingArea.Text     = PIM.BuildingArea;
     this.Txt_UsegrounArea.Text     = PIM.UsegrounArea;
     this.Txt_UndergroundArea.Text  = PIM.UndergroundArea;
     this.Txt_PrjFundInfo.Text      = PIM.PrjFundInfo;
     this.Txt_OtherStatement.Text   = PIM.OtherStatement;
     if (PIM.Xmgroup != "")
     {
         this.ddlXmgroup.SelectedValue = PIM.Xmgroup.ToString();
     }
     System.Data.DataTable dataTable = new System.Data.DataTable();
     if (dataTable != null && dataTable.Rows.Count > 0)
     {
         for (int i = 0; i < dataTable.Rows.Count; i++)
         {
             this.Txt_telphone.Text = dataTable.Rows[i]["telephone"].ToString();
             this.Txt_grade.Text    = dataTable.Rows[i]["grade"].ToString();
             string text = dataTable.Rows[i]["businessman"].ToString();
             this.Txt_businessman.Text = text.Substring(text.LastIndexOf("-") + 1);
         }
     }
 }
Exemple #11
0
 protected void Page_Load(object sender, System.EventArgs e)
 {
     if (!this.Page.IsPostBack)
     {
         string sqlString = "select NoteID,CodeName from  dbo.XPM_Basic_CodeList where TypeID=146 and IsValid='true' and IsVisible='true'";
         System.Data.DataTable dataSource = publicDbOpClass.DataTableQuary(sqlString);
         this.ddlXmgroup.DataSource     = dataSource;
         this.ddlXmgroup.DataValueField = "NoteID";
         this.ddlXmgroup.DataTextField  = "CodeName";
         this.ddlXmgroup.DataBind();
         this.ddlXmgroup.Items.Insert(0, new ListItem("--请选择--", "-1"));
         this.txt_StartDate.Attributes["onactivate"] = "getBeginDate();";
         this.txt_EndDate.Attributes["onactivate"]   = "getEndDate();";
         this.Drop_QualityClass_Bind();
         this.Drop_PrjKindClass_Bind();
         this.ddt_Area_Bind();
         this.Drop_zzGrade_Bind();
         this.Drop_ysType_Bind();
         this.Drop_cbType_Bind();
         this.Drop_Payment_Bind();
         this.Drop_zbType_Bind();
         this.Drop_jsType_Bind();
         this.Drop_PrimaryGrade_Bind();
         this.Drop_jzType_Bind();
         if (base.Request.QueryString["TypeCode"] == null)
         {
             this.Page.RegisterStartupScript("warn", "<script language=\"JavaScript\">alert(\"参数不正确!\");window.close();</script>");
         }
         else
         {
             this.ViewState["TYPECODE"] = base.Request.QueryString["TypeCode"].ToString();
         }
         if (base.Request.QueryString["op"] == null)
         {
             this.Page.RegisterStartupScript("warn", "<script language=\"JavaScript\">alert(\"参数不正确!\");window.close();</script>");
         }
         else
         {
             this.ViewState["OP"] = base.Request.QueryString["op"].ToString();
         }
         string a;
         if ((a = this.ViewState["OP"].ToString().ToLower()) != null)
         {
             if (a == "add")
             {
                 this.txt_StartDate.Text   = System.DateTime.Now.ToString("yyyy-M-dd");
                 this.txt_EndDate.Text     = System.DateTime.Now.ToString("yyyy-M-dd");
                 base.Header.Title         = "添加资源分类";
                 this.tbxPreCode.Text      = this.ViewState["TYPECODE"].ToString();
                 this.tbxPreCode.ReadOnly  = true;
                 this.TxtTypeCode.ReadOnly = true;
                 if (this.ViewState["TYPECODE"].ToString().Trim() != "")
                 {
                     string text = PMAction.MakeClassCode(this.ViewState["TYPECODE"].ToString().Trim());
                     this.TxtTypeCode.Text = text.Substring(this.tbxPreCode.Text.Trim().Length, text.Length - this.tbxPreCode.Text.Trim().Length);
                 }
                 else
                 {
                     string text = PMAction.MakeClassCode("");
                     this.TxtTypeCode.Text = text;
                 }
                 this.hdfGuid.Value  = System.Guid.NewGuid().ToString();
                 this.FileLink1.MID  = 18;
                 this.FileLink1.FID  = this.hdfGuid.Value;
                 this.FileLink1.Type = 1;
                 return;
             }
             if (a == "upd")
             {
                 PMModel pIM = new PMModel();
                 pIM = PMAction.GetSingleInfo(this.ViewState["TYPECODE"].ToString());
                 this.TextBind(pIM);
                 base.Header.Title         = "更新资源分类";
                 this.tbxPreCode.Visible   = false;
                 this.TxtTypeCode.Columns  = 20;
                 this.TxtTypeCode.ReadOnly = true;
                 this.SetModuleState(this.ViewState["TYPECODE"].ToString());
                 this.FileLink1.MID  = 18;
                 this.FileLink1.FID  = this.hdfGuid.Value;
                 this.FileLink1.Type = 1;
                 return;
             }
         }
         this.Page.RegisterStartupScript("warn", "<script language=\"JavaScript\">alert(\"参数不正确!\");window.close();</script>");
     }
 }
Exemple #12
0
    protected void btnSave_Click(object sender, System.EventArgs e)
    {
        if (string.IsNullOrEmpty(this.ManagerCode.Value))
        {
            this.Page.RegisterStartupScript("提示", "<script language=\"JavaScript\">alert(\"项目经理不能为空!\");</script>");
            return;
        }
        string userCode = base.UserCode;

        System.DateTime now     = System.DateTime.Now;
        string          podepom = string.Empty;

        if (base.UserCode == "00000000")
        {
            podepom = "," + base.UserCode;
        }
        else
        {
            podepom = ",00000000," + base.UserCode;
        }
        string  str        = this.tbxPreCode.Text.Trim();
        string  text       = this.TxtTypeCode.Text.Trim();
        string  recordDate = now.ToString();
        PMModel pMModel    = new PMModel();

        pMModel = this.GetTextValue();
        decimal childAllpri       = PMAction.getChildAllpri(str + text);
        decimal perpri            = PMAction.getPerpri(str + text);
        decimal childAllpriNotReg = PMAction.getChildAllpriNotReg(str + text);

        if (this.ViewState["OP"].ToString().ToLower() == "add")
        {
            if (PMAction.GetPrjInfoCount(str + text) > 0)
            {
                this.Page.RegisterStartupScript("提示", "<script language=\"JavaScript\">alert(\"分类编码已经存在,请纠正!\");</script>");
                return;
            }
            if (!PMAction.CheckCode(pMModel.PrjCode))
            {
                this.Page.RegisterStartupScript("提示", "<script language=\"JavaScript\">alert(\"编号重复!\");window.returnValue = true;window.close();</script>");
                return;
            }
            if (this.txt_PrjCost.Text.ToString().Trim() != "")
            {
            }
            if (perpri != 0m)
            {
                if (PMAction.AddPrjInfo(str + text, userCode, recordDate, pMModel, podepom))
                {
                    this.BLL_n.update(pMModel.PrjGuid.ToString(), this.Txt_grade.Text.ToString().Trim(), this.ManagerCodeYW.Value.ToString() + "-" + this.Txt_businessman.Text.Trim().ToString(), this.Txt_telphone.Text.Trim().ToString());
                    string mes = string.Concat(new string[]
                    {
                        "项目立项通知:编号为",
                        pMModel.PrjCode,
                        "的",
                        pMModel.PrjName,
                        "项目已经立项。"
                    });
                    this.getOrganiger(str + text, mes, this.ManagerCode.Value.ToString());
                    this.Page.RegisterStartupScript("提示", "<script language=\"JavaScript\">alert(\"保存成功!\");window.returnValue = true;window.close();</script>");
                    return;
                }
                this.Page.RegisterStartupScript("提示", "<script language=\"JavaScript\">alert(\"保存失败!\");window.returnValue = true;window.close();</script>");
                return;
            }
            else
            {
                if (PMAction.AddPrjInfo(str + text, userCode, recordDate, pMModel, podepom))
                {
                    this.BLL_n.update(pMModel.PrjGuid.ToString(), this.Txt_grade.Text.ToString().Trim(), this.ManagerCodeYW.Value.ToString() + "-" + this.Txt_businessman.Text.Trim().ToString(), this.Txt_telphone.Text.Trim().ToString());
                    string mes2 = string.Concat(new string[]
                    {
                        "项目立项通知:编号为",
                        pMModel.PrjCode,
                        "的",
                        pMModel.PrjName,
                        "项目已经立项。"
                    });
                    this.getOrganiger(str + text, mes2, this.ManagerCode.Value.ToString());
                    this.Page.RegisterStartupScript("提示", "<script language=\"JavaScript\">alert(\"保存成功!\");window.returnValue = true;window.close();</script>");
                    return;
                }
                this.Page.RegisterStartupScript("提示", "<script language=\"JavaScript\">alert(\"保存失败!\");window.returnValue = true;window.close();</script>");
                return;
            }
        }
        else
        {
            if (this.txt_PrjCost.Text.ToString().Trim() != "")
            {
            }
            if (!PMAction.UpCheckCode(this.ViewState["oldPrjcode"].ToString().Trim(), pMModel.PrjCode))
            {
                this.LabcodeWR.Text = "编号重复";
                return;
            }
            if (childAllpri == 0m)
            {
                if (PMAction.UpdPrjInfo(text, userCode, recordDate, pMModel))
                {
                    PMPrjAction.updatePrjCode(pMModel.PrjCode, pMModel.PrjGuid.ToString());
                    this.Page.RegisterStartupScript("提示", "<script language=\"JavaScript\">alert(\"保存成功!\");window.returnValue = true;window.close();</script>");
                    return;
                }
                this.Page.RegisterStartupScript("提示", "<script language=\"JavaScript\">alert(\"保存失败!\");</script>");
                return;
            }
            else
            {
                if (PMAction.UpdPrjInfo(text, userCode, recordDate, pMModel))
                {
                    this.Page.RegisterStartupScript("提示", "<script language=\"JavaScript\">alert(\"保存成功!\");window.returnValue = true;window.close();</script>");
                    return;
                }
                this.Page.RegisterStartupScript("提示", "<script language=\"JavaScript\">alert(\"保存失败!\");</script>");
                return;
            }
        }
    }
Exemple #13
0
    private void TextBind(PMModel PIM)
    {
        PTPrjInfoBll pTPrjInfoBll = new PTPrjInfoBll();

        System.Data.DataTable dataTable = pTPrjInfoBll.getDataTable(PIM.PrjGuid.ToString());
        this.hdfPrjGuid.Value = PIM.PrjGuid.ToString();
        if (dataTable != null && dataTable.Rows.Count > 0)
        {
            for (int i = 0; i < dataTable.Rows.Count; i++)
            {
                this.Label1.Text   = dataTable.Rows[i]["telephone"].ToString();
                this.Literal1.Text = dataTable.Rows[i]["grade"].ToString();
                this.Label3.Text   = dataTable.Rows[i]["businessman"].ToString();
                string text = dataTable.Rows[i]["businessman"].ToString();
                this.Label3.Text = text.Substring(text.LastIndexOf("-") + 1);
            }
        }
        this.labPrjcode.Text      = PIM.PrjCode;
        this.labPrjname.Text      = PIM.PrjName;
        this.labstarttime.Text    = PIM.StartDate.ToString("yyyy-MM-dd");
        this.labendtime.Text      = PIM.EndDate.ToString("yyyy-MM-dd");
        this.labPrjCost.Text      = PIM.PrjCost;
        this.labgq.Text           = PIM.Duration.ToString();
        this.labquclass.Text      = PMAction.gettypeName(PIM.QualityClass, 13);
        this.labPrjkind.Text      = PMAction.gettypeName(PIM.PrjKindClass, 3);
        this.labstata.Text        = PMAction.gettypeName(PIM.PrjState, 7);
        this.labarea.Text         = PMAction.gettypeName(PIM.Area, 19);
        this.LabRemark.Text       = PIM.Remark;
        this.labOwner.Text        = PIM.Owner;
        this.LabCounsellor.Text   = PIM.Counsellor;
        this.LabDesigner.Text     = PIM.Designer;
        this.LabInspector.Text    = PIM.Inspector;
        this.Labprjinfo.Text      = PIM.PrjInfo;
        this.LabPrjPlace.Text     = PIM.PrjPlace;
        this.Labrank.Text         = PMAction.gettypeName(PIM.Rank, 22);
        this.LabBudgetWay.Text    = PMAction.gettypeName(PIM.BudgetWay, 23);
        this.LabContractWay.Text  = PMAction.gettypeName(PIM.ContractWay, 24);
        this.LabPayCondition.Text = PMAction.gettypeName(PIM.PayCondition, 25);
        this.LabTenderWay.Text    = PMAction.gettypeName(PIM.TenderWay, 26);
        this.LabPayWay.Text       = PMAction.gettypeName(PIM.PayWay, 27);
        this.LabKeyPart.Text      = PMAction.gettypeName(PIM.KeyPart, 28);
        this.LabWorkUnit.Text     = PIM.WorkUnit;
        this.Lablinkman.Text      = PIM.LinkMan;
        if (PIM.PrjManager.ToString().Length > 8)
        {
            this.Labmanager.Text = PIM.PrjManager.Substring(9);
        }
        this.LabBuildingType.Text    = PMAction.gettypeName(PIM.BuildingType, 29);
        this.LabTotalHouseNum.Text   = PIM.TotalHouseNum;
        this.LabBuildingArea.Text    = PIM.BuildingArea;
        this.LabUsegrounArea.Text    = PIM.UsegrounArea;
        this.LabUndergroundArea.Text = PIM.UndergroundArea;
        this.LabPrjFundInfo.Text     = PIM.PrjFundInfo;
        this.LabOtherStatement.Text  = PIM.OtherStatement;
        for (int j = 0; j < this.Controls.Count; j++)
        {
            foreach (Control control in this.Controls[j].Controls)
            {
                if (control is Label && (control as Label).Text == "")
                {
                    (control as Label).Text = "------";
                }
            }
        }
    }