예제 #1
0
    //更新
    protected void Grid_Standard_Updating(object sender, GridViewUpdateEventArgs e)
    {
        //string iid = Grid_Standard.DataKeys[e.RowIndex].Value.ToString();
        Guid id   = new Guid(Grid_Standard.DataKeys[e.RowIndex].Value.ToString());//iqct
        Guid id1  = new Guid(Label31.Text.ToString());
        Guid inid = new Guid(Label32.Text.ToString());
        //Guid id = new Guid();
        string QCSV_Value  = ((TextBox)(Grid_Standard.Rows[e.RowIndex].Cells[3].Controls[0])).Text.Trim().ToString();
        string QCSV_Result = ((TextBox)(Grid_Standard.Rows[e.RowIndex].Cells[4].Controls[0])).Text.Trim().ToString();

        try
        {
            iQCBasicDataL.Insert_IQCStandardValue(id1, QCSV_Value, QCSV_Result, id);
        }
        catch (Exception)
        {
            ScriptManager.RegisterStartupScript(Page, typeof(Page), "alert", "alert('录入失败!')", true);
            return;
        }
        Grid_Standard.SelectedIndex = -1;
        Grid_Standard.EditIndex     = -1;
        Grid_Standard.DataSource    = iQCBasicDataL.Search_IQCStandardTable_Grid(id_IQCIT_ID, id_IMISD);
        Grid_Standard.DataBind();
        UpdatePanel_Standard.Update();
    }
예제 #2
0
 //编辑
 protected void Grid_Standard_Editing(object sender, GridViewEditEventArgs e)
 {
     Grid_Standard.EditIndex  = e.NewEditIndex;
     Grid_Standard.DataSource = iQCBasicDataL.Search_IQCStandardTable_Grid(id_IQCIT_ID, id_IMISD);
     Grid_Standard.DataBind();
     UpdatePanel_Standard.Update();
 }
예제 #3
0
 //两个关闭是按钮,一行数据上青天;
 protected void BtnSubmit_Click(object sender, EventArgs e)
 {
     Panel_Standard.Visible = false;
     UpdatePanel_Standard.Update();
     Panel_NewExpApp.Visible = false;
     UpdatePanel_NewExpApp.Update();
 }
예제 #4
0
 //取消
 protected void Grid_Standard_CancelingEdit(object sender, GridViewCancelEditEventArgs e)//取消编辑
 {
     Grid_Standard.SelectedIndex = -1;
     Grid_Standard.EditIndex     = -1;
     Grid_Standard.DataSource    = iQCBasicDataL.Search_IQCStandardTable_Grid(id_IQCIT_ID, id_IMISD);
     Grid_Standard.DataBind();
     UpdatePanel_Standard.Update();
 }
예제 #5
0
 //取消按钮
 protected void BtnClose_Click(object sender, EventArgs e)
 {
     TxtNewNum.Text         = "";
     TxtNewNote.Text        = "";
     Panel_Standard.Visible = false;
     UpdatePanel_Standard.Update();
     Panel_NewExpApp.Visible = false;
     UpdatePanel_NewExpApp.Update();
 }
예제 #6
0
 //操作Gridview的命令行
 protected void Grid_ETTestItem_RowCommand(object sender, GridViewCommandEventArgs e)
 {
     if (e.CommandName == "Edit_ItemAmount")
     {
         Panel_Standard.Visible   = true;
         id_IQCIT_ID              = new Guid(e.CommandArgument.ToString());
         Grid_Standard.DataSource = iQCBasicDataL.Search_IQCStandardTable_Grid(id_IQCIT_ID, id_IMISD);
         Grid_Standard.DataBind();
         UpdatePanel_Standard.Update();
     }
 }
예제 #7
0
    //待审核按钮
    protected void BtnSubmit_Click(object sender, EventArgs e)
    {
        IQCBasicDataInfo IQC = new IQCBasicDataInfo();

        IQC.IMISD_ID         = id_IMISD;
        IQC.IMMBD_MaterialID = id_IMMBD_MaterialID;
        IQC.IMIDS_QA         = "";
        IQC.IQCDT_Result     = "待审核";
        string op = TextBox2.Text;

        if (TxtNewNum.Text == "")
        {
            ScriptManager.RegisterClientScriptBlock(Page, typeof(Page), "alert", "alert('标记*的为必填项,请填写完整!')", true);
            return;
        }
        else
        {
            int m1;
            if (int.TryParse(TxtNewNum.Text.Trim(), out m1))
            {
                IQC.IQCDT_Input = m1;
            }
            else
            {
                ScriptManager.RegisterClientScriptBlock(Page, typeof(Page), "alert", "alert('投入数请输入整数!')", true);
                return;
            }
        }
        IQC.IQCDT_TestPer     = Session["UserName"].ToString();
        IQC.IQCDT_Description = TxtNewNote.Text.Trim();
        IQC.State             = "0";
        try
        {
            if (iQCBasicDataL.Update_IMInStoreDetail_IQC(IQC, op) <= 0)
            {
                ScriptManager.RegisterStartupScript(Page, typeof(Page), "alert", "alert('有检验项目没有录入结果!')", true);
                return;
            }
            ScriptManager.RegisterStartupScript(Page, typeof(Page), "alert", "alert('录入成功!')", true);
        }
        catch (Exception)
        {
            ScriptManager.RegisterStartupScript(Page, typeof(Page), "alert", "alert('有检验项目没有录入结果!')", true);
            return;
        }
        TxtNewNum.Text         = "";
        TxtNewNote.Text        = "";
        Panel_Standard.Visible = false;
        UpdatePanel_Standard.Update();
        Panel_NewExpApp.Visible = false;
        UpdatePanel_NewExpApp.Update();
    }
예제 #8
0
    //提交
    protected void BtnTijiao_Click(object sender, EventArgs e)
    {
        IQCBasicDataInfo IQC = new IQCBasicDataInfo();

        IQC.IMISD_ID         = id_IMISD;
        IQC.IMMBD_MaterialID = id_IMMBD_MaterialID;
        IQC.IMIDS_QA         = "";
        IQC.IQCDT_Result     = "待审核";
        if (TxtNewNum.Text == "" || Ddl_AuRe.SelectedValue == "请选择")
        {
            ScriptManager.RegisterClientScriptBlock(Page, typeof(Page), "alert", "alert('标记*的为必填项,请填写完整!')", true);
            return;
        }
        else
        {
            if (TxtActualNum.Text != "" && TxtNewNum.Text != "")
            {
                decimal come = Convert.ToDecimal(TxtActualNum.Text.ToString());
                decimal chou = Convert.ToDecimal(TxtNewNum.Text.ToString());
                if (chou > come)
                {
                    ScriptManager.RegisterClientScriptBlock(Page, typeof(Page), "alert", "alert('抽检数量大于到货数量,此操作违法,请注意单位!')", true);
                    return;
                }
            }
        }
        //else
        //{
        //    int m1;
        //    if (int.TryParse(TxtNewNum.Text.Trim(), out m1))
        //        IQC.IQCDT_Input = m1;
        //    else
        //    {
        //        ScriptManager.RegisterClientScriptBlock(Page, typeof(Page), "alert", "alert('投入数请输入整数!')", true);
        //        return;
        //    }
        //}
        IQC.IQCDT_Input       = Convert.ToDecimal(TxtNewNum.Text.ToString());
        IQC.IQCDT_TestPer     = Session["UserName"].ToString();
        IQC.IQCDT_Description = TxtNewNote.Text.Trim();
        IQC.State             = Ddl_AuRe.SelectedValue.ToString();
        Guid   id           = new Guid(Label31.Text);
        Guid   inID         = new Guid(Label32.Text.ToString());
        Guid   immaterialID = new Guid(Label33.Text);
        string op           = TextBox2.Text;

        try
        {
            if (iQCBasicDataL.Update_IMInStoreDetail_IQC(IQC, op) <= 0)
            {
                ScriptManager.RegisterStartupScript(Page, typeof(Page), "alert", "alert('有检验项目没有录入结果!')", true);
                return;
            }
            ScriptManager.RegisterStartupScript(Page, typeof(Page), "alert", "alert('录入成功!')", true);
        }
        catch (Exception)
        {
            ScriptManager.RegisterStartupScript(Page, typeof(Page), "alert", "alert('有检验项目没有录入结果!')", true);
            return;
        }

        TxtNewNum.Text         = "";
        TxtNewNote.Text        = "";
        Panel_Standard.Visible = false;
        UpdatePanel_Standard.Update();
        Panel_NewExpApp.Visible = false;
        UpdatePanel_NewExpApp.Update();
        string remind = "ERP系统消息:" + Session["UserName"].ToString() + "于" + DateTime.Now.ToString("F") + "提交了新的入库检验单,请及时进行审核!";
        string sErr   = RTXhelper.Send(remind, "进料检验审核");

        if (!string.IsNullOrEmpty(sErr))
        {
            ScriptManager.RegisterClientScriptBlock(Page, GetType(), "alert", "alert('" + sErr + "')", true);
        }
    }
예제 #9
0
 //关闭按钮
 protected void Btn_Close_Click(object sender, EventArgs e)
 {
     Panel_Standard.Visible = false;
     UpdatePanel_Standard.Update();
 }