示例#1
0
        protected void btnSet_Click(object sender, EventArgs e)
        {
            string  MsgCount = tboxMsgCount.Text.Trim();
            decimal MsgPrice = 0M;

            try
            {
                Convert.ToInt32(MsgCount);
                MsgPrice = Convert.ToDecimal(tboxMsgPrice.Text.Trim());
            }
            catch
            {
                Response.Write("<script language='javascript'>alert('请正确填写短信条数和金额!');</script>");
                return;
            }
            try
            {
                bool result = AdminChongZhiMsgBLL.AddAdminChongZhiMsg(MsgCount, MsgPrice);
                MsgDataBind();
            }
            catch (Exception ex)
            {
                ExceptionReporter.WriteLog(ex, ExceptionPostion.TBApply_Web_UI);
            }
        }
示例#2
0
 protected void grdCus_RowCommand(object sender, GridViewCommandEventArgs e)
 {
     if (e.CommandName == "Delete")
     {
         int i = Convert.ToInt32(e.CommandArgument);
         dt = AdminChongZhiMsgBLL.GetAdminChongZhiMsg(txt_StartTime.Value, txt_EndTime.Value);
         string id = dt.Rows[i]["id"].ToString();
         AdminChongZhiMsgBLL.DeleteAdminChongZhiMsg(id);
         MsgDataBind();
         Page.ClientScript.RegisterStartupScript(Page.GetType(), "message", "<script type='text/javascript' defer=defer>alert('删除成功!');</script>");
     }
 }
示例#3
0
 private void MsgDataBind()
 {
     try
     {
         dt = AdminChongZhiMsgBLL.GetAdminChongZhiMsg(txt_StartTime.Value, txt_EndTime.Value);
         grdCus.DataSource = dt;
         grdCus.DataBind();
     }
     catch (Exception ex)
     {
         ExceptionReporter.WriteLog(ex, ExceptionPostion.TBApply_Web_UI);
     }
 }