Example #1
0
 private void ShowInfo(int OperID)
 {
     WebDemo.BLL.WebDemo.Operation   bll   = new WebDemo.BLL.WebDemo.Operation();
     WebDemo.Model.WebDemo.Operation model = bll.GetModel(OperID);
     this.lblOperID.Text        = model.OperID.ToString();
     this.lblMeterID.Text       = model.MeterID.ToString();
     this.lblPayID.Text         = model.PayID.ToString();
     this.lblBeginMonth.Text    = model.BeginMonth;
     this.lblBeginNumber.Text   = model.BeginNumber.ToString();
     this.lblEndMonth.Text      = model.EndMonth;
     this.lblEndNumber.Text     = model.EndNumber.ToString();
     this.lblUseNumber.Text     = model.UseNumber.ToString();
     this.lblPriceTypeID.Text   = model.PriceTypeID.ToString();
     this.lblPriceTypeName.Text = model.PriceTypeName;
     this.lblPrice.Text         = model.Price.ToString();
     this.lblPrice2.Text        = model.Price2.ToString();
     this.lblPrice3.Text        = model.Price3.ToString();
     this.lblFareMoney.Text     = model.FareMoney.ToString();
     this.lblPayMark.Text       = model.PayMark.ToString();
     this.lblOperType.Text      = model.OperType.ToString();
     this.lblOperDate.Text      = model.OperDate.ToString();
     this.lblOperatorID.Text    = model.OperatorID.ToString();
     this.lblopermonth.Text     = model.opermonth;
     this.lblTID.Text           = model.TID.ToString();
     this.lblPriceUnit.Text     = model.PriceUnit;
     this.lblDerateid.Text      = model.Derateid.ToString();
     this.lblFareName.Text      = model.FareName;
     this.lblOperationName.Text = model.OperationName;
     this.lblDivid1.Text        = model.Divid1.ToString();
     this.lblDivid2.Text        = model.Divid2.ToString();
     this.lblUseNumber1.Text    = model.UseNumber1.ToString();
     this.lblUseNumber2.Text    = model.UseNumber2.ToString();
     this.lblUseNumber3.Text    = model.UseNumber3.ToString();
     this.lblDerateReason.Text  = model.DerateReason;
     this.lblAdditionNum.Text   = model.AdditionNum.ToString();
     this.lblFareID.Text        = model.FareID.ToString();
 }
Example #2
0
        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public WebDemo.Model.WebDemo.Operation GetModel(int OperID)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select  top 1 OperID,MeterID,PayID,BeginMonth,BeginNumber,EndMonth,EndNumber,UseNumber,PriceTypeID,PriceTypeName,Price,Price2,Price3,FareMoney,PayMark,OperType,OperDate,OperatorID,opermonth,TID,PriceUnit,Derateid,FareName,OperationName,Divid1,Divid2,UseNumber1,UseNumber2,UseNumber3,DerateReason,AdditionNum,FareID from Operation ");
            strSql.Append(" where OperID=@OperID");
            SqlParameter[] parameters =
            {
                new SqlParameter("@OperID", SqlDbType.Int, 4)
            };
            parameters[0].Value = OperID;

            WebDemo.Model.WebDemo.Operation model = new WebDemo.Model.WebDemo.Operation();
            DataSet ds = DbHelperSQL.Query(strSql.ToString(), parameters);

            if (ds.Tables[0].Rows.Count > 0)
            {
                return(DataRowToModel(ds.Tables[0].Rows[0]));
            }
            else
            {
                return(null);
            }
        }
Example #3
0
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public int Add(WebDemo.Model.WebDemo.Operation model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("insert into Operation(");
            strSql.Append("MeterID,PayID,BeginMonth,BeginNumber,EndMonth,EndNumber,UseNumber,PriceTypeID,PriceTypeName,Price,Price2,Price3,FareMoney,PayMark,OperType,OperDate,OperatorID,opermonth,TID,PriceUnit,Derateid,FareName,OperationName,Divid1,Divid2,UseNumber1,UseNumber2,UseNumber3,DerateReason,AdditionNum,FareID)");
            strSql.Append(" values (");
            strSql.Append("@MeterID,@PayID,@BeginMonth,@BeginNumber,@EndMonth,@EndNumber,@UseNumber,@PriceTypeID,@PriceTypeName,@Price,@Price2,@Price3,@FareMoney,@PayMark,@OperType,@OperDate,@OperatorID,@opermonth,@TID,@PriceUnit,@Derateid,@FareName,@OperationName,@Divid1,@Divid2,@UseNumber1,@UseNumber2,@UseNumber3,@DerateReason,@AdditionNum,@FareID)");
            strSql.Append(";select @@IDENTITY");
            SqlParameter[] parameters =
            {
                new SqlParameter("@MeterID",       SqlDbType.Int,         4),
                new SqlParameter("@PayID",         SqlDbType.Int,         4),
                new SqlParameter("@BeginMonth",    SqlDbType.VarChar,     7),
                new SqlParameter("@BeginNumber",   SqlDbType.Int,         4),
                new SqlParameter("@EndMonth",      SqlDbType.VarChar,    50),
                new SqlParameter("@EndNumber",     SqlDbType.Int,         4),
                new SqlParameter("@UseNumber",     SqlDbType.Int,         4),
                new SqlParameter("@PriceTypeID",   SqlDbType.Int,         4),
                new SqlParameter("@PriceTypeName", SqlDbType.VarChar,    50),
                new SqlParameter("@Price",         SqlDbType.Decimal,     9),
                new SqlParameter("@Price2",        SqlDbType.Decimal,     9),
                new SqlParameter("@Price3",        SqlDbType.Decimal,     9),
                new SqlParameter("@FareMoney",     SqlDbType.Decimal,     9),
                new SqlParameter("@PayMark",       SqlDbType.Int,         4),
                new SqlParameter("@OperType",      SqlDbType.Int,         4),
                new SqlParameter("@OperDate",      SqlDbType.DateTime),
                new SqlParameter("@OperatorID",    SqlDbType.Int,         4),
                new SqlParameter("@opermonth",     SqlDbType.VarChar,     7),
                new SqlParameter("@TID",           SqlDbType.Int,         4),
                new SqlParameter("@PriceUnit",     SqlDbType.VarChar,    50),
                new SqlParameter("@Derateid",      SqlDbType.Int,         4),
                new SqlParameter("@FareName",      SqlDbType.VarChar,    50),
                new SqlParameter("@OperationName", SqlDbType.VarChar,    50),
                new SqlParameter("@Divid1",        SqlDbType.Int,         4),
                new SqlParameter("@Divid2",        SqlDbType.Int,         4),
                new SqlParameter("@UseNumber1",    SqlDbType.Decimal,     9),
                new SqlParameter("@UseNumber2",    SqlDbType.Decimal,     9),
                new SqlParameter("@UseNumber3",    SqlDbType.Decimal,     9),
                new SqlParameter("@DerateReason",  SqlDbType.VarChar,   200),
                new SqlParameter("@AdditionNum",   SqlDbType.Decimal,     9),
                new SqlParameter("@FareID",        SqlDbType.Int, 4)
            };
            parameters[0].Value  = model.MeterID;
            parameters[1].Value  = model.PayID;
            parameters[2].Value  = model.BeginMonth;
            parameters[3].Value  = model.BeginNumber;
            parameters[4].Value  = model.EndMonth;
            parameters[5].Value  = model.EndNumber;
            parameters[6].Value  = model.UseNumber;
            parameters[7].Value  = model.PriceTypeID;
            parameters[8].Value  = model.PriceTypeName;
            parameters[9].Value  = model.Price;
            parameters[10].Value = model.Price2;
            parameters[11].Value = model.Price3;
            parameters[12].Value = model.FareMoney;
            parameters[13].Value = model.PayMark;
            parameters[14].Value = model.OperType;
            parameters[15].Value = model.OperDate;
            parameters[16].Value = model.OperatorID;
            parameters[17].Value = model.opermonth;
            parameters[18].Value = model.TID;
            parameters[19].Value = model.PriceUnit;
            parameters[20].Value = model.Derateid;
            parameters[21].Value = model.FareName;
            parameters[22].Value = model.OperationName;
            parameters[23].Value = model.Divid1;
            parameters[24].Value = model.Divid2;
            parameters[25].Value = model.UseNumber1;
            parameters[26].Value = model.UseNumber2;
            parameters[27].Value = model.UseNumber3;
            parameters[28].Value = model.DerateReason;
            parameters[29].Value = model.AdditionNum;
            parameters[30].Value = model.FareID;

            object obj = DbHelperSQL.GetSingle(strSql.ToString(), parameters);

            if (obj == null)
            {
                return(0);
            }
            else
            {
                return(Convert.ToInt32(obj));
            }
        }
Example #4
0
 /// <summary>
 /// 得到一个对象实体
 /// </summary>
 public WebDemo.Model.WebDemo.Operation DataRowToModel(DataRow row)
 {
     WebDemo.Model.WebDemo.Operation model = new WebDemo.Model.WebDemo.Operation();
     if (row != null)
     {
         if (row["OperID"] != null && row["OperID"].ToString() != "")
         {
             model.OperID = int.Parse(row["OperID"].ToString());
         }
         if (row["MeterID"] != null && row["MeterID"].ToString() != "")
         {
             model.MeterID = int.Parse(row["MeterID"].ToString());
         }
         if (row["PayID"] != null && row["PayID"].ToString() != "")
         {
             model.PayID = int.Parse(row["PayID"].ToString());
         }
         if (row["BeginMonth"] != null)
         {
             model.BeginMonth = row["BeginMonth"].ToString();
         }
         if (row["BeginNumber"] != null && row["BeginNumber"].ToString() != "")
         {
             model.BeginNumber = int.Parse(row["BeginNumber"].ToString());
         }
         if (row["EndMonth"] != null)
         {
             model.EndMonth = row["EndMonth"].ToString();
         }
         if (row["EndNumber"] != null && row["EndNumber"].ToString() != "")
         {
             model.EndNumber = int.Parse(row["EndNumber"].ToString());
         }
         if (row["UseNumber"] != null && row["UseNumber"].ToString() != "")
         {
             model.UseNumber = int.Parse(row["UseNumber"].ToString());
         }
         if (row["PriceTypeID"] != null && row["PriceTypeID"].ToString() != "")
         {
             model.PriceTypeID = int.Parse(row["PriceTypeID"].ToString());
         }
         if (row["PriceTypeName"] != null)
         {
             model.PriceTypeName = row["PriceTypeName"].ToString();
         }
         if (row["Price"] != null && row["Price"].ToString() != "")
         {
             model.Price = decimal.Parse(row["Price"].ToString());
         }
         if (row["Price2"] != null && row["Price2"].ToString() != "")
         {
             model.Price2 = decimal.Parse(row["Price2"].ToString());
         }
         if (row["Price3"] != null && row["Price3"].ToString() != "")
         {
             model.Price3 = decimal.Parse(row["Price3"].ToString());
         }
         if (row["FareMoney"] != null && row["FareMoney"].ToString() != "")
         {
             model.FareMoney = decimal.Parse(row["FareMoney"].ToString());
         }
         if (row["PayMark"] != null && row["PayMark"].ToString() != "")
         {
             model.PayMark = int.Parse(row["PayMark"].ToString());
         }
         if (row["OperType"] != null && row["OperType"].ToString() != "")
         {
             model.OperType = int.Parse(row["OperType"].ToString());
         }
         if (row["OperDate"] != null && row["OperDate"].ToString() != "")
         {
             model.OperDate = DateTime.Parse(row["OperDate"].ToString());
         }
         if (row["OperatorID"] != null && row["OperatorID"].ToString() != "")
         {
             model.OperatorID = int.Parse(row["OperatorID"].ToString());
         }
         if (row["opermonth"] != null)
         {
             model.opermonth = row["opermonth"].ToString();
         }
         if (row["TID"] != null && row["TID"].ToString() != "")
         {
             model.TID = int.Parse(row["TID"].ToString());
         }
         if (row["PriceUnit"] != null)
         {
             model.PriceUnit = row["PriceUnit"].ToString();
         }
         if (row["Derateid"] != null && row["Derateid"].ToString() != "")
         {
             model.Derateid = int.Parse(row["Derateid"].ToString());
         }
         if (row["FareName"] != null)
         {
             model.FareName = row["FareName"].ToString();
         }
         if (row["OperationName"] != null)
         {
             model.OperationName = row["OperationName"].ToString();
         }
         if (row["Divid1"] != null && row["Divid1"].ToString() != "")
         {
             model.Divid1 = int.Parse(row["Divid1"].ToString());
         }
         if (row["Divid2"] != null && row["Divid2"].ToString() != "")
         {
             model.Divid2 = int.Parse(row["Divid2"].ToString());
         }
         if (row["UseNumber1"] != null && row["UseNumber1"].ToString() != "")
         {
             model.UseNumber1 = decimal.Parse(row["UseNumber1"].ToString());
         }
         if (row["UseNumber2"] != null && row["UseNumber2"].ToString() != "")
         {
             model.UseNumber2 = decimal.Parse(row["UseNumber2"].ToString());
         }
         if (row["UseNumber3"] != null && row["UseNumber3"].ToString() != "")
         {
             model.UseNumber3 = decimal.Parse(row["UseNumber3"].ToString());
         }
         if (row["DerateReason"] != null)
         {
             model.DerateReason = row["DerateReason"].ToString();
         }
         if (row["AdditionNum"] != null && row["AdditionNum"].ToString() != "")
         {
             model.AdditionNum = decimal.Parse(row["AdditionNum"].ToString());
         }
         if (row["FareID"] != null && row["FareID"].ToString() != "")
         {
             model.FareID = int.Parse(row["FareID"].ToString());
         }
     }
     return(model);
 }
Example #5
0
        /// <summary>
        /// 更新一条数据
        /// </summary>
        public bool Update(WebDemo.Model.WebDemo.Operation model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("update Operation set ");
            strSql.Append("MeterID=@MeterID,");
            strSql.Append("PayID=@PayID,");
            strSql.Append("BeginMonth=@BeginMonth,");
            strSql.Append("BeginNumber=@BeginNumber,");
            strSql.Append("EndMonth=@EndMonth,");
            strSql.Append("EndNumber=@EndNumber,");
            strSql.Append("UseNumber=@UseNumber,");
            strSql.Append("PriceTypeID=@PriceTypeID,");
            strSql.Append("PriceTypeName=@PriceTypeName,");
            strSql.Append("Price=@Price,");
            strSql.Append("Price2=@Price2,");
            strSql.Append("Price3=@Price3,");
            strSql.Append("FareMoney=@FareMoney,");
            strSql.Append("PayMark=@PayMark,");
            strSql.Append("OperType=@OperType,");
            strSql.Append("OperatorID=@OperatorID,");
            strSql.Append("opermonth=@opermonth,");
            strSql.Append("TID=@TID,");
            strSql.Append("PriceUnit=@PriceUnit,");
            strSql.Append("Derateid=@Derateid,");
            strSql.Append("FareName=@FareName,");
            strSql.Append("OperationName=@OperationName,");
            strSql.Append("Divid1=@Divid1,");
            strSql.Append("Divid2=@Divid2,");
            strSql.Append("UseNumber1=@UseNumber1,");
            strSql.Append("UseNumber2=@UseNumber2,");
            strSql.Append("UseNumber3=@UseNumber3,");
            strSql.Append("DerateReason=@DerateReason,");
            strSql.Append("AdditionNum=@AdditionNum,");
            strSql.Append("FareID=@FareID");
            strSql.Append(" where OperID=@OperID");
            SqlParameter[] parameters =
            {
                new SqlParameter("@MeterID",       SqlDbType.Int,       4),
                new SqlParameter("@PayID",         SqlDbType.Int,       4),
                new SqlParameter("@BeginMonth",    SqlDbType.VarChar,   7),
                new SqlParameter("@BeginNumber",   SqlDbType.Int,       4),
                new SqlParameter("@EndMonth",      SqlDbType.VarChar,  50),
                new SqlParameter("@EndNumber",     SqlDbType.Int,       4),
                new SqlParameter("@UseNumber",     SqlDbType.Int,       4),
                new SqlParameter("@PriceTypeID",   SqlDbType.Int,       4),
                new SqlParameter("@PriceTypeName", SqlDbType.VarChar,  50),
                new SqlParameter("@Price",         SqlDbType.Decimal,   9),
                new SqlParameter("@Price2",        SqlDbType.Decimal,   9),
                new SqlParameter("@Price3",        SqlDbType.Decimal,   9),
                new SqlParameter("@FareMoney",     SqlDbType.Decimal,   9),
                new SqlParameter("@PayMark",       SqlDbType.Int,       4),
                new SqlParameter("@OperType",      SqlDbType.Int,       4),
                new SqlParameter("@OperatorID",    SqlDbType.Int,       4),
                new SqlParameter("@opermonth",     SqlDbType.VarChar,   7),
                new SqlParameter("@TID",           SqlDbType.Int,       4),
                new SqlParameter("@PriceUnit",     SqlDbType.VarChar,  50),
                new SqlParameter("@Derateid",      SqlDbType.Int,       4),
                new SqlParameter("@FareName",      SqlDbType.VarChar,  50),
                new SqlParameter("@OperationName", SqlDbType.VarChar,  50),
                new SqlParameter("@Divid1",        SqlDbType.Int,       4),
                new SqlParameter("@Divid2",        SqlDbType.Int,       4),
                new SqlParameter("@UseNumber1",    SqlDbType.Decimal,   9),
                new SqlParameter("@UseNumber2",    SqlDbType.Decimal,   9),
                new SqlParameter("@UseNumber3",    SqlDbType.Decimal,   9),
                new SqlParameter("@DerateReason",  SqlDbType.VarChar, 200),
                new SqlParameter("@AdditionNum",   SqlDbType.Decimal,   9),
                new SqlParameter("@FareID",        SqlDbType.Int,       4),
                new SqlParameter("@OperID",        SqlDbType.Int,       4),
                new SqlParameter("@OperDate",      SqlDbType.DateTime)
            };
            parameters[0].Value  = model.MeterID;
            parameters[1].Value  = model.PayID;
            parameters[2].Value  = model.BeginMonth;
            parameters[3].Value  = model.BeginNumber;
            parameters[4].Value  = model.EndMonth;
            parameters[5].Value  = model.EndNumber;
            parameters[6].Value  = model.UseNumber;
            parameters[7].Value  = model.PriceTypeID;
            parameters[8].Value  = model.PriceTypeName;
            parameters[9].Value  = model.Price;
            parameters[10].Value = model.Price2;
            parameters[11].Value = model.Price3;
            parameters[12].Value = model.FareMoney;
            parameters[13].Value = model.PayMark;
            parameters[14].Value = model.OperType;
            parameters[15].Value = model.OperatorID;
            parameters[16].Value = model.opermonth;
            parameters[17].Value = model.TID;
            parameters[18].Value = model.PriceUnit;
            parameters[19].Value = model.Derateid;
            parameters[20].Value = model.FareName;
            parameters[21].Value = model.OperationName;
            parameters[22].Value = model.Divid1;
            parameters[23].Value = model.Divid2;
            parameters[24].Value = model.UseNumber1;
            parameters[25].Value = model.UseNumber2;
            parameters[26].Value = model.UseNumber3;
            parameters[27].Value = model.DerateReason;
            parameters[28].Value = model.AdditionNum;
            parameters[29].Value = model.FareID;
            parameters[30].Value = model.OperID;
            parameters[31].Value = model.OperDate;

            int rows = DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Example #6
0
        public void btnSave_Click(object sender, EventArgs e)
        {
            string strErr = "";

            if (!PageValidate.IsNumber(txtMeterID.Text))
            {
                strErr += "表编号格式错误!\\n";
            }
            if (!PageValidate.IsNumber(txtPayID.Text))
            {
                strErr += "缴费ID格式错误!\\n";
            }
            if (this.txtBeginMonth.Text.Trim().Length == 0)
            {
                strErr += "起始月份不能为空!\\n";
            }
            if (!PageValidate.IsNumber(txtBeginNumber.Text))
            {
                strErr += "起始读数格式错误!\\n";
            }
            if (this.txtEndMonth.Text.Trim().Length == 0)
            {
                strErr += "终止月份不能为空!\\n";
            }
            if (!PageValidate.IsNumber(txtEndNumber.Text))
            {
                strErr += "终止读数格式错误!\\n";
            }
            if (!PageValidate.IsNumber(txtUseNumber.Text))
            {
                strErr += "周期用量格式错误!\\n";
            }
            if (!PageValidate.IsNumber(txtPriceTypeID.Text))
            {
                strErr += "PriceTypeID格式错误!\\n";
            }
            if (this.txtPriceTypeName.Text.Trim().Length == 0)
            {
                strErr += "价格名称不能为空!\\n";
            }
            if (!PageValidate.IsDecimal(txtPrice.Text))
            {
                strErr += "单价格式错误!\\n";
            }
            if (!PageValidate.IsDecimal(txtPrice2.Text))
            {
                strErr += "单价格式错误!\\n";
            }
            if (!PageValidate.IsDecimal(txtPrice3.Text))
            {
                strErr += "单价格式错误!\\n";
            }
            if (!PageValidate.IsDecimal(txtFareMoney.Text))
            {
                strErr += "费用格式错误!\\n";
            }
            if (!PageValidate.IsNumber(txtPayMark.Text))
            {
                strErr += "缴费标志格式错误!\\n";
            }
            if (!PageValidate.IsNumber(txtOperType.Text))
            {
                strErr += "业务类型(1-抄表结算;2-换表结算格式错误!\\n";
            }
            if (!PageValidate.IsDateTime(txtOperDate.Text))
            {
                strErr += "业务日期格式错误!\\n";
            }
            if (!PageValidate.IsNumber(txtOperatorID.Text))
            {
                strErr += "操作员格式错误!\\n";
            }
            if (this.txtopermonth.Text.Trim().Length == 0)
            {
                strErr += "opermonth不能为空!\\n";
            }
            if (!PageValidate.IsNumber(txtTID.Text))
            {
                strErr += "TID格式错误!\\n";
            }
            if (this.txtPriceUnit.Text.Trim().Length == 0)
            {
                strErr += "PriceUnit不能为空!\\n";
            }
            if (!PageValidate.IsNumber(txtDerateid.Text))
            {
                strErr += "Derateid格式错误!\\n";
            }
            if (this.txtFareName.Text.Trim().Length == 0)
            {
                strErr += "FareName不能为空!\\n";
            }
            if (this.txtOperationName.Text.Trim().Length == 0)
            {
                strErr += "OperationName不能为空!\\n";
            }
            if (!PageValidate.IsNumber(txtDivid1.Text))
            {
                strErr += "Divid1格式错误!\\n";
            }
            if (!PageValidate.IsNumber(txtDivid2.Text))
            {
                strErr += "Divid2格式错误!\\n";
            }
            if (!PageValidate.IsDecimal(txtUseNumber1.Text))
            {
                strErr += "UseNumber1格式错误!\\n";
            }
            if (!PageValidate.IsDecimal(txtUseNumber2.Text))
            {
                strErr += "UseNumber2格式错误!\\n";
            }
            if (!PageValidate.IsDecimal(txtUseNumber3.Text))
            {
                strErr += "UseNumber3格式错误!\\n";
            }
            if (this.txtDerateReason.Text.Trim().Length == 0)
            {
                strErr += "DerateReason不能为空!\\n";
            }
            if (!PageValidate.IsDecimal(txtAdditionNum.Text))
            {
                strErr += "AdditionNum格式错误!\\n";
            }
            if (!PageValidate.IsNumber(txtFareID.Text))
            {
                strErr += "FareID格式错误!\\n";
            }

            if (strErr != "")
            {
                MessageBox.Show(this, strErr);
                return;
            }
            int      OperID        = int.Parse(this.lblOperID.Text);
            int      MeterID       = int.Parse(this.txtMeterID.Text);
            int      PayID         = int.Parse(this.txtPayID.Text);
            string   BeginMonth    = this.txtBeginMonth.Text;
            int      BeginNumber   = int.Parse(this.txtBeginNumber.Text);
            string   EndMonth      = this.txtEndMonth.Text;
            int      EndNumber     = int.Parse(this.txtEndNumber.Text);
            int      UseNumber     = int.Parse(this.txtUseNumber.Text);
            int      PriceTypeID   = int.Parse(this.txtPriceTypeID.Text);
            string   PriceTypeName = this.txtPriceTypeName.Text;
            decimal  Price         = decimal.Parse(this.txtPrice.Text);
            decimal  Price2        = decimal.Parse(this.txtPrice2.Text);
            decimal  Price3        = decimal.Parse(this.txtPrice3.Text);
            decimal  FareMoney     = decimal.Parse(this.txtFareMoney.Text);
            int      PayMark       = int.Parse(this.txtPayMark.Text);
            int      OperType      = int.Parse(this.txtOperType.Text);
            DateTime OperDate      = DateTime.Parse(this.txtOperDate.Text);
            int      OperatorID    = int.Parse(this.txtOperatorID.Text);
            string   opermonth     = this.txtopermonth.Text;
            int      TID           = int.Parse(this.txtTID.Text);
            string   PriceUnit     = this.txtPriceUnit.Text;
            int      Derateid      = int.Parse(this.txtDerateid.Text);
            string   FareName      = this.txtFareName.Text;
            string   OperationName = this.txtOperationName.Text;
            int      Divid1        = int.Parse(this.txtDivid1.Text);
            int      Divid2        = int.Parse(this.txtDivid2.Text);
            decimal  UseNumber1    = decimal.Parse(this.txtUseNumber1.Text);
            decimal  UseNumber2    = decimal.Parse(this.txtUseNumber2.Text);
            decimal  UseNumber3    = decimal.Parse(this.txtUseNumber3.Text);
            string   DerateReason  = this.txtDerateReason.Text;
            decimal  AdditionNum   = decimal.Parse(this.txtAdditionNum.Text);
            int      FareID        = int.Parse(this.txtFareID.Text);


            WebDemo.Model.WebDemo.Operation model = new WebDemo.Model.WebDemo.Operation();
            model.OperID        = OperID;
            model.MeterID       = MeterID;
            model.PayID         = PayID;
            model.BeginMonth    = BeginMonth;
            model.BeginNumber   = BeginNumber;
            model.EndMonth      = EndMonth;
            model.EndNumber     = EndNumber;
            model.UseNumber     = UseNumber;
            model.PriceTypeID   = PriceTypeID;
            model.PriceTypeName = PriceTypeName;
            model.Price         = Price;
            model.Price2        = Price2;
            model.Price3        = Price3;
            model.FareMoney     = FareMoney;
            model.PayMark       = PayMark;
            model.OperType      = OperType;
            model.OperDate      = OperDate;
            model.OperatorID    = OperatorID;
            model.opermonth     = opermonth;
            model.TID           = TID;
            model.PriceUnit     = PriceUnit;
            model.Derateid      = Derateid;
            model.FareName      = FareName;
            model.OperationName = OperationName;
            model.Divid1        = Divid1;
            model.Divid2        = Divid2;
            model.UseNumber1    = UseNumber1;
            model.UseNumber2    = UseNumber2;
            model.UseNumber3    = UseNumber3;
            model.DerateReason  = DerateReason;
            model.AdditionNum   = AdditionNum;
            model.FareID        = FareID;

            WebDemo.BLL.WebDemo.Operation bll = new WebDemo.BLL.WebDemo.Operation();
            bll.Update(model);
            Maticsoft.Common.MessageBox.ShowAndRedirect(this, "保存成功!", "list.aspx");
        }