Пример #1
0
 //进度表的编辑、删除
 //protected void Gridview2_RowCommand(object sender, GridViewCommandEventArgs e)
 //{
 //    if (e.CommandName == "Modify")//编辑
 //    {
 //        GridViewRow row = ((LinkButton)e.CommandSource).Parent.Parent as GridViewRow;
 //        Gridview2.SelectedIndex = row.RowIndex;
 //        this.label_ProgramID.Text = e.CommandArgument.ToString();
 //        this.label9.Visible = true;
 //        this.DropDownList1.SelectedValue = this.Gridview2.Rows[row.RowIndex].Cells[1].Text.ToString();
 //        this.TextBox10.Text = this.Gridview2.Rows[row.RowIndex].Cells[2].Text.ToString();
 //        this.Panel_NewProgram.Visible = true;
 //        this.UpdatePanel_NewProgram.Update();
 //    }
 //}
 //提交开发进度
 protected void Button_Rocky(object sender, EventArgs e)
 {
     if (DropDownList1.SelectedValue != "请选择")
     {
         CRMNewCustormDevelopinfo.CRMNCD_DevelopState = DropDownList1.SelectedValue.ToString();
     }
     else
     {
         ScriptManager.RegisterClientScriptBlock(UpdatePanel_NewProgram, GetType(), "aa", "alert('标记*的为必填项,请填写完整!')", true);
         return;
     }
     if (TextBox10.Text != "")
     {
         CRMNewCustormDevelopinfo.CRMNCD_DetailCondition = TextBox10.Text;
     }
     else
     {
         ScriptManager.RegisterClientScriptBlock(UpdatePanel_NewProgram, GetType(), "aa", "alert('标记*的为必填项,请填写完整!')", true);
         return;
     }
     CRMNewCustormDevelopinfo.CRMNCD_ID = new Guid(label_ManID.Text.ToString());
     ccl.UpdateCRMNewCustormDevelop_Schedule(CRMNewCustormDevelopinfo);
     TextBox10.Text = "";
     DropDownList1.SelectedValue = "请选择";
     Panel_NewProgram.Visible    = false;
     UpdatePanel_NewProgram.Update();
     BindGridview1("");
     UpdatePanel_OutWeb.Update();
 }
Пример #2
0
 //取消填写进度
 protected void Button_Mel(object sender, EventArgs e)
 {
     TextBox10.Text = "";
     DropDownList1.SelectedValue = "请选择";
     Panel_NewProgram.Visible    = false;
     UpdatePanel_NewProgram.Update();
 }
Пример #3
0
    //检索
    protected void Button1_Sh(object sender, EventArgs e)
    {
        string condition = GetCondition();

        BindGridview1(condition);
        UpdatePanel_OutWeb.Update();
        Panel_SampleNew.Visible = false;
        UpdatePanel_SampleNew.Update();
        Panel_Supply.Visible = false;
        UpdatePanel_Supply.Update();
        Panel_NewProgram.Visible = false;
        UpdatePanel_NewProgram.Update();
        Panel1.Visible = false;
        UpdatePanel1.Update();
    }
Пример #4
0
 //编辑、删除、开发进度
 protected void Gridview1_RowCommand(object sender, GridViewCommandEventArgs e)
 {
     if (e.CommandName == "Modify1")//编辑
     {
         GridViewRow row = ((LinkButton)e.CommandSource).Parent.Parent as GridViewRow;
         Gridview1.SelectedIndex = row.RowIndex;
         label_ManID.Text        = e.CommandArgument.ToString();
         label_New.Text          = "修改客户信息";
         TextBox2.Text           = Gridview1.Rows[row.RowIndex].Cells[2].Text.ToString();
         TextBox6.Text           = Gridview1.Rows[row.RowIndex].Cells[1].Text.ToString();
         TextBox3.Text           = Gridview1.Rows[row.RowIndex].Cells[3].Text.ToString();
         Panel_SampleNew.Visible = true;
         UpdatePanel_SampleNew.Update();
     }
     if (e.CommandName == "Delete1")//删除
     {
         GridViewRow row = ((LinkButton)e.CommandSource).Parent.Parent as GridViewRow;
         Gridview1.SelectedIndex            = row.RowIndex;
         label_ManID.Text                   = e.CommandArgument.ToString();
         CRMNewCustormDevelopinfo.CRMNCD_ID = new Guid(label_ManID.Text);
         ccl.DeleteCRMNewCustormDevelop(CRMNewCustormDevelopinfo);
         BindGridview1("");
         UpdatePanel_OutWeb.Update();
         ScriptManager.RegisterClientScriptBlock(UpdatePanel_OutWeb, GetType(), "aa", "alert('删除成功!')", true);
         return;
     }
     if (e.CommandName == "Analysis")//开发进度
     {
         GridViewRow row = ((LinkButton)e.CommandSource).Parent.Parent as GridViewRow;
         Gridview1.SelectedIndex = row.RowIndex;
         label_ManID.Text        = e.CommandArgument.ToString();
         label9.Text             = Gridview1.Rows[row.RowIndex].Cells[1].Text.ToString() + "   " + Gridview1.Rows[row.RowIndex].Cells[2].Text.ToString() + "   " + Gridview1.Rows[row.RowIndex].Cells[3].Text.ToString();
         string condition;
         condition = "and CRMNCD_ID='" + label_ManID.Text + "'";
         BindGridview2(condition);
         label9.Visible = true;
         if (Gridview2.Rows.Count > 0)
         {
             TextBox10.Text = Gridview2.Rows[0].Cells[2].Text.ToString();
         }
         Panel_NewProgram.Visible = true;
         UpdatePanel_NewProgram.Update();
     }
 }