Esempio n. 1
0
 //取消规则制定
 protected void CanelRuleInfo(object sender, EventArgs e)
 {
     try
     {
         UpdatePanel_PMPAR_RuleInfo.Update();
         Panel_PMPAR_RuleInfo.Visible = false;
     }
     catch (Exception)
     {
         throw;
     }
 }
Esempio n. 2
0
 //新增
 protected void Button2_Nw(object sender, EventArgs e)
 {
     try
     {
         TextBox2.Enabled                   = true;
         label_Rule.Text                    = "新增";
         Button4.Visible                    = false;
         Button6.Visible                    = true;
         Button7.Visible                    = true;
         Panel_PMPAR_RuleInfo.Visible       = true;
         UpdatePanel_PMPAR_RuleInfo.Visible = true;
         UpdatePanel_PMPAR_RuleInfo.Update();
     }
     catch (Exception)
     {
         throw;
     }
 }
Esempio n. 3
0
 protected void CanelRule(object sender, EventArgs e)
 {
     UpdatePanel_PMPAR_RuleInfo.Update();
     Panel_PMPAR_RuleInfo.Visible = false;
 }
Esempio n. 4
0
 //删除采购规则
 protected void Gridview_PMPApplyRule_RowCommand(object sender, GridViewCommandEventArgs e)
 {
     try
     {
         if (e.CommandName == "Delete1")
         {
             GridViewRow row = ((LinkButton)e.CommandSource).Parent.Parent as GridViewRow;
             Gridview_PMPApplyRuleInfo.SelectedIndex = row.RowIndex;
             Guid supplyid = new Guid(Convert.ToString(e.CommandArgument));
             pmp.DeletePMPurchaseingApplyRule(supplyid);
             BindGridView_PMPApplyRuleinfo_One("");
             UpdatePanel_PMPApplyRuleInfo.Update();
             ScriptManager.RegisterClientScriptBlock(UpdatePanel_PMPApplyRuleInfo, GetType(), "alert", "alert('删除成功!')", true);
             return;
         }
         if (e.CommandName == "Edit1")//编辑
         {
             GridViewRow row = ((LinkButton)e.CommandSource).Parent.Parent as GridViewRow;
             Gridview_PMPApplyRuleInfo.SelectedIndex = row.RowIndex;
             label_Rule.Text   = "编辑";
             Button4.Visible   = false;
             Button6.Visible   = true;
             Button7.Visible   = true;
             TextBox2.Enabled  = true;
             label_RuleID.Text = e.CommandArgument.ToString();
             string    condition = " and PMPAR_ID='" + label_RuleID.Text + "'";
             Guid      supplyid  = new Guid(Convert.ToString(e.CommandArgument));
             DataSet   ds        = pmp.SelectPMPurchaseingApplyRule_One(condition);
             DataTable dt        = ds.Tables[0];
             if (dt.Rows.Count > 0)
             {
                 TextBox2.Text = dt.Rows[0][3].ToString();
             }
             Panel_PMPAR_RuleInfo.Visible = true;
             UpdatePanel_PMPAR_RuleInfo.Update();
         }
         if (e.CommandName == "Look1")//查看
         {
             GridViewRow row = ((LinkButton)e.CommandSource).Parent.Parent as GridViewRow;
             Gridview_PMPApplyRuleInfo.SelectedIndex = row.RowIndex;
             Button4.Visible  = true;
             Button6.Visible  = false;
             Button7.Visible  = false;
             TextBox2.Enabled = false;
             Guid supplyid = new Guid(Convert.ToString(e.CommandArgument));
             if (DDList1.SelectedValue == "否")
             {
                 string    condition = " and PMPAR_ID='" + supplyid + "'";
                 DataSet   ds        = pmp.SelectPMPurchaseingApplyRule(condition);
                 DataTable dt        = ds.Tables[0];
                 if (dt.Rows.Count > 0)
                 {
                     TextBox2.Text = dt.Rows[0][3].ToString();
                 }
             }
             if (DDList1.SelectedValue == "是")
             {
                 string    condition = " and PMPAR_ID='" + supplyid + "'";
                 DataSet   ds        = pmp.SelectPMPurchaseingApplyRule_One(condition);
                 DataTable dt        = ds.Tables[0];
                 if (dt.Rows.Count > 0)
                 {
                     TextBox2.Text = dt.Rows[0][3].ToString();
                 }
             }
             Panel_PMPAR_RuleInfo.Visible = true;
             UpdatePanel_PMPAR_RuleInfo.Update();
         }
     }
     catch (Exception)
     {
         throw;
     }
 }