Exemplo n.º 1
0
 /// <summary>
 /// 发送总开关
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnSave1_Click(object sender, EventArgs e)
 {
     try
     {
         SParamsetRule rule   = new SParamsetRule();
         SParamset     entity = new SParamset();
         entity.ID = (int)EnumSParamset.发送总开关;
         entity.SelectByID();
         if (chkOpen.Checked)
         {
             entity.SetValueInt = 1;
         }
         else
         {
             entity.SetValueInt = 0;
         }
         rule.RUpdate(entity);
         this.ShowMessage("参数设置成功");
         BindSParamset1();
     }
     catch (Exception E)
     {
         this.ShowMessage(E.Message);
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// 禁止发送日期设置
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnSave7_Click(object sender, EventArgs e)
 {
     try
     {
         SParamsetRule rule   = new SParamsetRule();
         SParamset     entity = new SParamset();
         entity.ID = (int)EnumSParamset.禁止发送日期设置;
         entity.SelectByID();
         entity.SetValueStr = SysConvert.ToString(txtNoSendDate.Text.Trim());
         rule.RUpdate(entity);
         this.ShowMessage("参数设置成功");
         BindSParamset7();
     }
     catch (Exception E)
     {
         this.ShowMessage(E.Message);
     }
 }
Exemplo n.º 3
0
 /// <summary>
 /// 信息内容字数限制
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnSave3_Click(object sender, EventArgs e)
 {
     try
     {
         SParamsetRule rule   = new SParamsetRule();
         SParamset     entity = new SParamset();
         entity.ID = (int)EnumSParamset.信息内容字数限制;
         entity.SelectByID();
         entity.SetValueInt = SysConvert.ToInt32(txtFontNum.Text.Trim());
         rule.RUpdate(entity);
         this.ShowMessage("参数设置成功");
         BindSParamset3();
     }
     catch (Exception E)
     {
         this.ShowMessage(E.Message);
     }
 }
Exemplo n.º 4
0
        private void btnSave6_Click(object sender, EventArgs e)
        {
            try
            {
                SParamsetRule rule   = new SParamsetRule();
                SParamset     entity = new SParamset();
                entity.ID = (int)EnumSParamset.禁止发送星期几设置;
                entity.SelectByID();
                string str = "";
                for (int i = 0; i <= 7; i++)
                {
                    if (str != "")
                    {
                        str += ",";
                    }
                    switch (i)
                    {
                    case 1:
                        if (chk1.Checked)
                        {
                            str += "1";
                        }
                        else
                        {
                            str += "0";
                        }
                        break;

                    case 2:
                        if (chk2.Checked)
                        {
                            str += "2";
                        }
                        else
                        {
                            str += "0";
                        }
                        break;

                    case 3:
                        if (chk3.Checked)
                        {
                            str += "3";
                        }
                        else
                        {
                            str += "0";
                        }
                        break;

                    case 4:
                        if (chk4.Checked)
                        {
                            str += "4";
                        }
                        else
                        {
                            str += "0";
                        }
                        break;

                    case 5:
                        if (chk5.Checked)
                        {
                            str += "5";
                        }
                        else
                        {
                            str += "0";
                        }
                        break;

                    case 6:
                        if (chk6.Checked)
                        {
                            str += "6";
                        }
                        else
                        {
                            str += "0";
                        }
                        break;

                    case 7:
                        if (chk7.Checked)
                        {
                            str += "7";
                        }
                        else
                        {
                            str += "0";
                        }
                        break;

                    default:
                        break;
                    }
                }
                entity.SetValueStr = str;
                rule.RUpdate(entity);
                this.ShowMessage("参数设置成功");
                BindSParamset6();
            }
            catch (Exception E)
            {
                this.ShowMessage(E.Message);
            }
        }