コード例 #1
0
        public void Save()
        {
            Node nd = new Node(this.FK_Node);

            //保存抄送规则
            nd.HisCCRole = (CCRole)(int.Parse(this.DDL_CCRole.SelectedValue));
            //保存写入规则
            nd.CCWriteTo = (CCWriteTo)(int.Parse(this.DDL_CCWriteTo.SelectedValue));
            nd.DirectUpdate();
            //cha
            BP.WF.Template.CC cc = new BP.WF.Template.CC();
            cc.NodeID = this.FK_Node;
            cc.Retrieve();
            cc.CCTitle = this.TB_title_MB.Text;
            cc.CCDoc   = this.TB_content_MB.Text;
            cc.DirectUpdate();
            if (CC_GW.Checked == true)
            {
                cc.CCIsStations = true;
                cc.DirectUpdate();
            }
            else
            {
                cc.CCIsStations = false;
                cc.DirectUpdate();
            }
            if (CC_DBM.Checked == true)
            {
                cc.CCIsDepts = true;
                cc.DirectUpdate();
            }
            else
            {
                cc.CCIsDepts = false;
                cc.DirectUpdate();
            }
            if (CC_RY.Checked == true)
            {
                cc.CCIsEmps = true;
                cc.DirectUpdate();
            }
            else
            {
                cc.CCIsEmps = false;
                cc.DirectUpdate();
            }
            if (CC_SQL.Checked == true)
            {
                cc.CCIsSQLs = true;
                cc.CCSQL    = this.CC_SQL1.Text;
                cc.DirectUpdate();
            }
            else
            {
                cc.CCIsSQLs = false;
                cc.CCSQL    = this.CC_SQL1.Text;
                cc.DirectUpdate();
            }
        }
コード例 #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         BP.WF.Template.BtnLab btn = new BP.WF.Template.BtnLab(this.FK_Node);
         Node nd = new Node(this.FK_Node);
         BP.WF.Template.CC cc = new BP.WF.Template.CC();
         cc.NodeID = this.FK_Node;
         cc.Retrieve();
         BP.Web.Controls.Glo.DDL_BindEnum(this.DDL_CCRole, "CCRole", (int)btn.CCRole);
         BP.Web.Controls.Glo.DDL_BindEnum(this.DDL_CCWriteTo, "CCWriteTo", (int)nd.CCWriteTo);
         this.DDL_CCRole.SelectedValue    = btn.CCRole.ToString();
         this.DDL_CCWriteTo.SelectedValue = nd.CCWriteTo.ToString();
         this.TB_title_MB.Text            = cc.CCTitle;
         this.TB_content_MB.Text          = cc.CCDoc;
         if (cc.CCIsStations == true)
         {
             this.CC_GW.Checked = true;
         }
         else
         {
             this.CC_GW.Checked = false;
         }
         if (cc.CCIsDepts == true)
         {
             this.CC_DBM.Checked = true;
         }
         else
         {
             this.CC_DBM.Checked = false;
         }
         if (cc.CCIsEmps == true)
         {
             this.CC_RY.Checked = true;
         }
         else
         {
             this.CC_RY.Checked = false;
         }
         if (cc.CCIsSQLs == true)
         {
             this.CC_SQL.Checked = true;
             this.CC_SQL1.Text   = cc.CCSQL;
         }
         else
         {
             this.CC_SQL.Checked = false;
             this.CC_SQL1.Text   = cc.CCSQL;
         }
     }
 }