Exemple #1
0
 public static WebSetEntity list()
 {
     WebSetEntity ws = new WebSetEntity();
     DataRow dr = DbHelper.ExecuteDataRow("p_WebSet_list");
     if (dr != null)
     {
         ws.Id = Convert.ToInt32(dr["id"]);
         ws.WebOn = Convert.ToBoolean(dr["webOn"]);
         ws.MinAmount = Convert.ToInt32(dr["minAmount"]);
         ws.MinTax = Convert.ToInt32(dr["minTax"]);
         ws.RefreshMinute = Convert.ToInt16(dr["refreshMinute"]);
         ws.DeliveryDocCreateHHMM = dr["DeliveryDocCreateHHMM"].ToString();
         ws.autoAddPrice = Convert.ToBoolean(dr["autoAddPrice"]);
         if (dr["companyScore"] != DBNull.Value)
             ws.CompanyScore = Convert.ToInt32(dr["companyScore"]);
         ws.SendSMS = Convert.ToBoolean(dr["sendSMS"]);
         ws.UpdatePriceDt = dr["updatePriceDt"].ToString();
         ws.NotchangePriceDay = Convert.ToInt32(dr["notchangePriceDay"]);
         if (dr["deductRatio"]!=DBNull.Value)
             ws.DeductRatio = Convert.ToDecimal(dr["deductRatio"]);
         ws.PriceCheckStartTime = dr["priceCheckStartTime"].ToString();
         ws.PriceCheckEndTime = dr["priceCheckEndTime"].ToString();
         if (dr["enableCheckPrice"] != DBNull.Value)
             ws.EnableCheckPrice = Convert.ToBoolean(dr["enableCheckPrice"]);
     }
     return ws;
 }
        protected void btn_Save_Click(object sender, EventArgs e)
        {
            WebSetEntity ws = new WebSetEntity();

            ws.Id = Convert.ToInt32(hid_id.Value);
            ws.WebOn = rbn_WebOnYes.Checked ? true : false;
            ws.MinAmount = Convert.ToInt32(txt_MinAmount.Text);
            ws.MinTax = Convert.ToInt32(txt_MinTax.Text);
            ws.RefreshMinute = Convert.ToInt16(txt_RefreshMintue.Text);
            ws.DeliveryDocCreateHHMM = txt_deliveryDocCreate.Text;
            ws.autoAddPrice = rbn_autoAddPriceYes.Checked ? true : false;
            ws.CompanyScore = Convert.ToInt32(txt_initScore.Text.Trim());
            ws.SendSMS = rbn_SendSMSYes.Checked ? true : false;

            ws.UpdatePriceDt = ext_updatePriceDt.SelectedTime.ToString();
            //ws.UpdatePriceDt = ext_updatePriceDt.Value.ToString();

            ws.NotchangePriceDay = Convert.ToInt32(txt_notchangePriceDay.Text.Trim());
            ws.DeductRatio = Convert.ToDecimal(txt_deductRatio.Text);

            //ws.PriceCheckStartTime = string.Format("{0}:{1}", txtPriceCheckStartTime.SelectedTime.Hours,txtPriceCheckStartTime.SelectedTime.Minutes);
            //ws.PriceCheckEndTime = string.Format("{0}:{1}",txtPriceCheckStartTime.SelectedTime.Hours,txtPriceCheckStartTime.SelectedTime.Minutes);
            ws.PriceCheckStartTime = txtPriceCheckStartTime.SelectedTime.ToString();
            ws.PriceCheckEndTime = txtPriceCheckEndTime.SelectedTime.ToString();
            log4net.ILog logger = log4net.LogManager.GetLogger("ApplicationFileAppender");
            logger.Info(ws.PriceCheckStartTime);
            ws.EnableCheckPrice = chkEnablePriceCheck.Checked;
            logic.webset.update(ws);
            getDetails();
            this.ScriptManager1.AddScript("Ext.Msg.alert('成功','     保存成功!          '); ");
            return;
        }
Exemple #3
0
 public static void update(WebSetEntity ws)
 {
     WebSet.update(ws);
 }
Exemple #4
0
 public static void update(WebSetEntity ws)
 {
     DbHelper.ExecuteNonQuery("p_WebSet_update",
         ws.Id, ws.WebOn, ws.MinAmount, ws.MinTax, ws.RefreshMinute, ws.DeliveryDocCreateHHMM,ws.autoAddPrice,ws.CompanyScore,
         ws.SendSMS,ws.UpdatePriceDt,ws.NotchangePriceDay,ws.DeductRatio,ws.PriceCheckStartTime,ws.PriceCheckEndTime,ws.EnableCheckPrice);
 }