예제 #1
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_SampleID.Text     = e.CommandArgument.ToString();
            label_New.Text          = Gridview1.Rows[row.RowIndex].Cells[1].Text.ToString();
            TextBox4.Text           = Gridview1.Rows[row.RowIndex].Cells[7].Text.ToString();

            TextBox6.Text = Gridview1.Rows[row.RowIndex].Cells[2].Text.ToString();
            TextBox2.Text = Gridview1.Rows[row.RowIndex].Cells[5].Text.ToString();
            DropDownList4.SelectedValue = Gridview1.Rows[row.RowIndex].Cells[6].Text.ToString();
            TextBox7.Text           = Gridview1.DataKeys[row.RowIndex]["CRMOS_Remark"].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_SampleID.Text           = e.CommandArgument.ToString();
            CRMOutsideSampleinfo.CRMOS_ID = new Guid(label_SampleID.Text.ToString());
            cs.DeleteCRMOutsideSample(CRMOutsideSampleinfo);
            BindGridview1("");
            UpdatePanel_OutWeb.Update();
            ScriptManager.RegisterClientScriptBlock(UpdatePanel_OutWeb, GetType(), "alert", "alert('删除成功!')", true);
            return;
        }
        if (e.CommandName == "Analysis")//分析
        {
            GridViewRow row = ((LinkButton)e.CommandSource).Parent.Parent as GridViewRow;
            Gridview1.SelectedIndex = row.RowIndex;
            label_SampleID.Text     = e.CommandArgument.ToString();
            label_Result.Text       = Gridview1.Rows[row.RowIndex].Cells[1].Text.ToString() + "   " + Gridview1.Rows[row.RowIndex].Cells[2].Text.ToString();
            TextBox14.Text          = Gridview1.DataKeys[row.RowIndex]["CRMOS_AnalysisResult"].ToString();
            Panel_Check.Visible     = true;
            UpdatePanel_Check.Update();
        }
        if (e.CommandName == "Check1")
        {
            GridViewRow row = ((LinkButton)e.CommandSource).Parent.Parent as GridViewRow;
            label18.Text   = Gridview1.Rows[row.RowIndex].Cells[4].Text.ToString();
            label19.Text   = e.CommandArgument.ToString();
            Panel1.Visible = true;
            BindBos();
            UpdatePanel1.Update();
        }
        if (e.CommandName == "UP1")
        {
            Label46.Text = e.CommandArgument.ToString();
            ShowPanel();
            UpdatePanel_upload.Update();
        }
    }
예제 #2
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_Check.Visible = false;
        UpdatePanel_Check.Update();
    }
예제 #3
0
 //提交分析结论
 protected void Button1_ComF(object sender, EventArgs e)
 {
     CRMOutsideSampleinfo.CRMOS_ID = new Guid(label_SampleID.Text.ToString());
     if (TextBox14.Text != "")
     {
         CRMOutsideSampleinfo.CRMOS_State          = "已分析";
         CRMOutsideSampleinfo.CRMOS_AnalysisResult = TextBox14.Text.ToString();
         string man = Session["UserName"].ToString();
         cs.UpdateCRMOutsideSample_Analysis(CRMOutsideSampleinfo, man);
         TextBox14.Text      = "";
         Panel_Check.Visible = false;
         UpdatePanel_Check.Update();
         BindGridview1("");
         UpdatePanel_OutWeb.Update();
     }
     else
     {
         ScriptManager.RegisterClientScriptBlock(UpdatePanel_Check, GetType(), "alert", "alert('标记*的为必填项,请填写完整!')", true);
         return;
     }
 }
예제 #4
0
 //取消填写分析结论
 protected void Button_CancelF(object sender, EventArgs e)
 {
     TextBox14.Text      = "";
     Panel_Check.Visible = false;
     UpdatePanel_Check.Update();
 }