Beispiel #1
0
        protected void btn_submit_Click(object sender, EventArgs e)
        {
            int ID = Convert.ToInt32(Request.QueryString["id"]);

            WebModels.Tbl_ProjectBuilderContract BuilderContract = WebBLL.Tbl_ProjectBuilderContractManager.GetTbl_ProjectBuilderContractById(ID);
            BuilderContract.PBC_StartTime = Convert.ToDateTime(this.PBC_StartTime.Value);
            BuilderContract.PBC_Time1     = Convert.ToDateTime(this.PBC_Time1.Value);
            BuilderContract.PBC_Time2     = Convert.ToDateTime(this.PBC_Time2.Value);
            BuilderContract.PBC_Link      = this.PBC_Link.Value;
            BuilderContract.PBC_Content   = this.PBC_Content.Value;
            if (FileUpload1.FileName != "")
            {
                BuilderContract.PBC_File = WebCommon.Public.UploadFile(FileUpload1, "ProjectBuilderContract");
            }

            BuilderContract.PBC_Price   = Convert.ToInt32(this.PBC_Price.Value);
            BuilderContract.PBC_FeeType = this.PBC_FeeType.SelectedValue;
            BuilderContract.Remark      = this.Remark.Value;
            BuilderContract.Status      = this.Stauts.SelectedValue;
            int count = WebBLL.Tbl_ProjectBuilderContractManager.UpdateTbl_ProjectBuilderContract(BuilderContract);

            if (true)
            {
                ScriptManager.RegisterStartupScript(this, this.GetType(), "message", "alert('修改成功!');window.external.reload();window.external.close();", true);
            }
            else
            {
                ScriptManager.RegisterStartupScript(this, this.GetType(), "message", "alert('修改失败!');", true);
            }
        }
Beispiel #2
0
        protected void btn_submit_Click(object sender, EventArgs e)
        {
            WebModels.Tbl_ProjectBuilderContract BuilderContract = new WebModels.Tbl_ProjectBuilderContract();
            BuilderContract.ProjectID     = Convert.ToInt32(this.ProjectName.SelectedValue);
            BuilderContract.PBC_CompanyID = Convert.ToInt32(this.PBC_CompanyID.SelectedValue);
            BuilderContract.PBC_StartTime = Convert.ToDateTime(this.PBC_StartTime.Value);
            BuilderContract.PBC_Time1     = Convert.ToDateTime(this.PBC_Time1.Value);
            BuilderContract.PBC_Time2     = Convert.ToDateTime(this.PBC_Time2.Value);
            BuilderContract.PBC_Link      = this.PBC_Link.Value;
            BuilderContract.PBC_Content   = this.PBC_Content.Value;
            BuilderContract.PBC_File      = WebCommon.Public.UploadFile(FileUpload1, "ProjectBuilderContract");
            BuilderContract.PBC_Price     = Convert.ToInt32(this.PBC_Price.Value);
            BuilderContract.PBC_FeeType   = this.PBC_FeeType.SelectedValue;
            BuilderContract.Remark        = this.Remark.Value;
            BuilderContract.Status        = this.Stauts.SelectedValue;
            BuilderContract.DealUser      = WebCommon.Public.GetUserName();
            int count = WebBLL.Tbl_ProjectBuilderContractManager.AddTbl_ProjectBuilderContract(BuilderContract);

            if (true)
            {
                ScriptManager.RegisterStartupScript(this, this.GetType(), "message", "alert('添加成功!');window.external.reload();window.external.close();", true);
            }
            else
            {
                ScriptManager.RegisterStartupScript(this, this.GetType(), "message", "alert('添加失败!');", true);
            }
        }
Beispiel #3
0
        public void Bind()
        {
            int ID = Convert.ToInt32(Request.QueryString["id"]);

            WebModels.Tbl_ProjectBuilderContract project = WebBLL.Tbl_ProjectBuilderContractManager.GetTbl_ProjectBuilderContractById(ID);
            this.ProjectName.SelectedValue   = project.ProjectID.ToString();
            this.PBC_CompanyID.SelectedValue = project.PBC_CompanyID.ToString();
            this.PBC_StartTime.Value         = project.PBC_StartTime.ToString("yyyy-MM-dd");
            this.PBC_Time1.Value             = project.PBC_Time1.ToString("yyyy-MM-dd");
            this.PBC_Time2.Value             = project.PBC_Time2.ToString("yyyy-MM-dd");
            this.PBC_Link.Value            = project.PBC_Link.ToString();
            this.PBC_Content.Value         = project.PBC_Content.ToString();
            this.PBC_Price.Value           = project.PBC_Price.ToString();
            this.PBC_FeeType.SelectedValue = project.PBC_FeeType.ToString();
            this.Remark.Value         = project.Remark.ToString();
            this.Stauts.SelectedValue = project.Status.ToString();
        }