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

            WebModels.Tbl_ProjectBuyAcount Design = WebBLL.Tbl_ProjectBuyAcountManager.GetTbl_ProjectBuyAcountById(ID);
            Design.PO_Content   = this.PO_Content.Value;
            Design.PO_StartTime = Convert.ToDateTime(this.PO_StartTime.Value);
            Design.PO_Time1     = Convert.ToDateTime(this.PO_Time1.Value);
            Design.PO_Time2     = Convert.ToDateTime(this.PO_Time2.Value);
            Design.PO_Link      = Convert.ToString(this.PO_Link.Value);
            Design.PO_Price     = Convert.ToDouble(this.PO_Price.Value);
            Design.PO_FeeType   = this.PO_FeeType.SelectedValue;
            Design.Status       = this.Stauts.SelectedValue;
            Design.Remark       = this.Remark.Value;
            Design.DealUser     = WebCommon.Public.GetUserName();
            if (FileUpload1.FileName != "")
            {
                Design.PO_File = WebCommon.Public.UploadFile(FileUpload1, "ProjectBuyAcount");
            }

            int count = WebBLL.Tbl_ProjectBuyAcountManager.UpdateTbl_ProjectBuyAcount(Design);

            if (count > 0)
            {
                ScriptManager.RegisterStartupScript(this, this.GetType(), "message", "alert('修改成功!');window.external.reload();window.external.close();", true);
            }
            else
            {
                ScriptManager.RegisterStartupScript(this, this.GetType(), "message", "alert('修改失败!');", true);
            }
        }
Пример #2
0
        protected void btn_submit_Click(object sender, EventArgs e)
        {
            WebModels.Tbl_ProjectBuyAcount Design = new WebModels.Tbl_ProjectBuyAcount();
            Design.ProjectID    = Convert.ToInt32(this.ProjectName.SelectedValue);
            Design.PO_CompanyID = Convert.ToInt32(this.PO_CompanyID.SelectedValue);
            Design.PO_Content   = this.PO_Content.Value;
            Design.PO_StartTime = Convert.ToDateTime(this.PO_StartTime.Value);
            Design.PO_Time1     = Convert.ToDateTime(this.PO_Time1.Value);
            Design.PO_Time2     = Convert.ToDateTime(this.PO_Time2.Value);
            Design.PO_Link      = Convert.ToString(this.PO_Link.Value);
            Design.PO_Price     = Convert.ToDouble(this.PO_Price.Value);
            Design.PO_FeeType   = this.PO_FeeType.SelectedValue;
            Design.Status       = "";//this.Status.SelectedValue;
            Design.Remark       = this.Remark.Value;
            Design.DealUser     = WebCommon.Public.GetUserName();
            Design.PO_File      = WebCommon.Public.UploadFile(FileUpload1, "ProjectBuyAcount");
            int count = WebBLL.Tbl_ProjectBuyAcountManager.AddTbl_ProjectBuyAcount(Design);

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

            WebModels.Tbl_ProjectBuyAcount Design = WebBLL.Tbl_ProjectBuyAcountManager.GetTbl_ProjectBuyAcountById(ID);
            this.ProjectName.Text         = Design.ProjectID.ToString();
            this.PO_CompanyID.Text        = Design.PO_CompanyID.ToString();
            this.PO_Content.Value         = Design.PO_Content;
            this.PO_StartTime.Value       = Design.PO_StartTime.ToString("yyyy-MM-dd");
            this.PO_Time1.Value           = Design.PO_Time1.ToString("yyyy-MM-dd");
            this.PO_Time2.Value           = Design.PO_Time2.ToString("yyyy-MM-dd");
            this.PO_Link.Value            = Design.PO_Link;
            this.PO_Price.Value           = Design.PO_Price.ToString();
            this.PO_FeeType.SelectedValue = Design.PO_FeeType;
            this.Stauts.SelectedValue     = Design.Status;
            this.Remark.Value             = Design.Remark;
        }