/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Page_Load(object sender, EventArgs e) { string t = null; if (this.IsInsert()) { t = "水费计收"; } else { t = "水费修改"; } MasterPageHelper.SetTitle(this, t); if (!IsPostBack) { YongShuiGuanLiLib.ValidatorMessageCreater.CreateSQLDateTimeMessage( this.cvBegin); YongShuiGuanLiLib.ValidatorMessageCreater.CreateSQLDateTimeMessage( this.cvEnd); this.cvName.Text = "*"; this.cvName.ErrorMessage = "收费名称不能为空"; this.cvUnitPrice.Text = "*"; this.cvUnitPrice.ErrorMessage = "无效的数字"; this.cvTotalPrice.Text = "*"; this.cvTotalPrice.ErrorMessage = "无效的数字"; this.cvUsedTotal.Text = "*"; this.cvUsedTotal.ErrorMessage = "无效的数字"; // wateruser bind // WaterUserClass wu = SessionManager.LoginSession.WaterUser; if (wu != null) { WaterUserDataBinder.DataBind(wu, this.ddlWaterUser); } if (this.IsUpdate()) { DataTable tbl = FeeDBI.GetFeeDataTableWithFeeID(this.EditID); if (tbl.Rows.Count > 0) { FillFeeInfo(tbl.Rows[0]); } } } }
/// <summary> /// /// </summary> private void Insert() { FeeDBI.InsertFee( this.WaterUserID, this.FeeName, this.Begin, this.End, this.TianShu, this.UnitPrice, this.WaterAmount, this.WaterLost, this.UsedAmount, this.UsedPrice, this.PayPrice, this.LeftPrice, this.Remark); }