Example #1
0
    private void LoadPageinfo()
    {
        DataTable dt = BusiLogicSetBus.GetBusiLogicSet("");

        if (dt != null && dt.Rows.Count > 0)
        {
            BusiLogicSetList.DataSource = dt;
            BusiLogicSetList.DataBind();
        }
    }
Example #2
0
 protected void Save_SubjAssistant_Click(object sender, System.Web.UI.ImageClickEventArgs e)
 {
     try
     {
         if (!Check())
         {
             this.ClientScript.RegisterStartupScript(this.GetType(), "info", "<script>popMsgObj.ShowMsg('请选择项目!');</script>");
         }
         else
         {
             if (BusiLogicSetList.Items.Count > 0)
             {
                 for (int i = 0; i < BusiLogicSetList.Items.Count; i++)
                 {
                     CheckBox check = BusiLogicSetList.Items[i].FindControl("CheckStatus") as CheckBox;
                     if (check.Checked)
                     {
                         string       Id         = BusiLogicSetList.DataKeys[i].ToString();
                         DropDownList DrpList    = BusiLogicSetList.Items[i].FindControl("DrpLogicSet") as DropDownList;
                         string       UsedStatus = "";
                         if (DrpList != null)
                         {
                             UsedStatus = DrpList.SelectedValue;
                         }
                         if (Convert.ToInt32(Id) > 0)
                         {
                             bool result = BusiLogicSetBus.UpdateBusiLogic(Convert.ToInt32(Id), UsedStatus);
                             if (result)
                             {
                                 this.ClientScript.RegisterStartupScript(this.GetType(), "info", "<script>popMsgObj.ShowMsg('修改成功');</script>");
                                 LoadPageinfo();
                             }
                         }
                     }
                 }
             }
         }
     }
     catch
     {
         this.ClientScript.RegisterStartupScript(this.GetType(), "info", "<script>popMsgObj.ShowMsg('修改失败,请联系管理员');</script>");
     }
 }