protected void Check_NOK(object sender, EventArgs e) { if (TextBox9.Text == "") { ScriptManager.RegisterClientScriptBlock(Page, GetType(), "alert", "alert('驳回时必须填写审核意见')", true); return; } string note = TextBox9.Text.ToString(); string man = Session["UserName"].ToString(); string state = "审核驳回"; string bos = DropDownList2.SelectedValue.ToString(); Guid id = new Guid(label19.Text.ToString()); cs.UpdateCRMOutsideSample_Check(id, man, state, bos, note); ScriptManager.RegisterClientScriptBlock(Page, GetType(), "alert", "alert('审核驳回')", true); Panel1.Visible = false; UpdatePanel1.Update(); TextBox9.Text = ""; BindGridview1(""); UpdatePanel_OutWeb.Update(); string remind = "ERP系统消息:" + Session["UserName"].ToString() + "于" + DateTime.Now.ToString("F") + "驳回了你提交的外来样品申请!"; string sendman = label18.Text; string sErr = RTXhelper.SendbyUserName(remind, sendman); if (!string.IsNullOrEmpty(sErr)) { ScriptManager.RegisterClientScriptBlock(Page, GetType(), "alert", "alert('" + sErr + "')", true); } }
//提交申请单 protected void Btn_makeOrder_Click(object sender, EventArgs e) { try { if (Label_OEMOT_ID.Text.Trim() == "") { try { odd.I_OEMOrderTrack(new Guid(Label_SMSOD_ID.Text.Trim()), TextBox11.Text.Trim(), Convert.ToDateTime(TextBox5.Text.Trim()), Convert.ToDateTime(TextBox7.Text.Trim() == "" ? "1970-01-01" : TextBox7.Text.Trim()), Convert.ToDateTime(TextBox12.Text.Trim() == "" ? "1970-01-01" : TextBox12.Text.Trim()), TextBox8.Text.Trim(), Convert.ToDateTime(TextBox3.Text.Trim())); label_RTX.Text = "ERP系统信息:" + Session["UserName"].ToString() + "于" + DateTime.Now + "制定了" + label_CursNum.Text + "的加工订单表,请会签。"; string message = label_RTX.Text; string sErr = RTXhelper.Send(message, "加工订单跟踪会签"); if (!string.IsNullOrEmpty(sErr)) { ScriptManager.RegisterClientScriptBlock(Page, GetType(), "alert", "alert('" + sErr + "')", true); } } catch (Exception) { ScriptManager.RegisterStartupScript(Page, typeof(Page), "alert", "alert('标记*的为必填项,请填写完整!')", true); return; } } else { try { odd.U_OEMOrderTrack(new Guid(Label_OEMOT_ID.Text.Trim()), TextBox11.Text.Trim(), Convert.ToDateTime(TextBox5.Text.Trim()), Convert.ToDateTime(TextBox7.Text.Trim() == "" ? "1970-01-01" : TextBox7.Text.Trim()), Convert.ToDateTime(TextBox12.Text.Trim() == "" ? "1970-01-01" : TextBox12.Text.Trim()), TextBox8.Text.Trim(), Convert.ToDateTime(TextBox3.Text.Trim())); } catch (Exception) { ScriptManager.RegisterStartupScript(Page, typeof(Page), "alert", "alert('标记*的为必填项,请填写完整!')", true); return; } } } catch (Exception) { ScriptManager.RegisterStartupScript(Page, typeof(Page), "alert", "alert('操作失败,请您再次核对!')", true); return; } Panel2.Visible = false; UpdatePanel2.Update(); TextBox5.Text = ""; TextBox7.Text = ""; TextBox12.Text = ""; TextBox11.Text = ""; TextBox8.Text = ""; TextBox3.Text = ""; //随工单信息pannel隐藏 Panel4.Visible = false; TextBox20.Text = ""; TextBox21.Text = ""; label_Order.Text = ""; UpdatePanel4.Update(); databind(); }
//提交选择会签部门 protected void Button_ComSPP(object sender, EventArgs e) { bool temp = false; string Dep = ""; foreach (GridViewRow item in Gridview3.Rows) { CheckBox rb = item.FindControl("CheckMarkup") as CheckBox; if (rb.Checked) { Dep = Gridview3.Rows[item.RowIndex].Cells[2].Text.ToString(); string condition = "and PT_ID='" + label_PT_ID.Text.ToString() + "'" + "and PTC_Dep='" + Dep + "'"; DataSet ds = psd.SelectPTCountersign(condition); DataTable dt = ds.Tables[0]; if (dt.Rows.Count > 0) { ScriptManager.RegisterClientScriptBlock(Page, GetType(), "aa", "alert('会签部门不能重复!')", true); return; } else { int p = psd.InsertPTCountersign(new Guid(label_PT_ID.Text.ToString()), Dep); temp = true; } } } if (!temp) { ScriptManager.RegisterClientScriptBlock(UpdatePanel_Org, GetType(), "aa", "alert('请选择部门')", true); return; } else { ScriptManager.RegisterClientScriptBlock(Page, GetType(), "aa", "alert('提交成功!')", true); Panel_Org.Visible = false; UpdatePanel_Org.Update(); //string dep = ""; //foreach (GridViewRow q in Gridview4.Rows) //{ // dep += q.Cells[1].Text.ToString() + ","; //} //dep = dep.Substring(0, dep.Length - 1); label_RTX.Text = "ERP系统信息:" + Session["UserRole"].ToString() + "于" + DateTime.Now + "提交了" + Gridview2.Rows[Gridview2.SelectedIndex].Cells[1].ToString() + "的特殊产品申请单"; string message = label_RTX.Text; string sErr = RTXhelper.Send(message, "特殊产品申请制定"); if (!string.IsNullOrEmpty(sErr)) { ScriptManager.RegisterClientScriptBlock(Page, GetType(), "alert", "alert('" + sErr + "')", true); } } }
protected void Button4_Click(object sender, EventArgs e) { if (TextBox6.Text == "" || TextBox7.Text == "") { ScriptManager.RegisterStartupScript(this.Page, typeof(Page), "alert", "alert('标记*的为必填项,请填写完整!')", true); return; } DateTime startdate = Convert.ToDateTime(TextBox6.Text); DateTime enddate = Convert.ToDateTime(TextBox7.Text); if (DateTime.Compare(startdate, enddate) > 0) { ScriptManager.RegisterStartupScript(this.Page, typeof(Page), "alert", "alert('结束日期不能在开始日期之前!')", true); } else { int year = int.Parse(Label11.Text); int month = int.Parse(Label12.Text); string man = Session["UserName"].ToString(); string makedate = DateTime.Now.ToString("yyyy-MM-dd"); Guid pmpid = new Guid(Label14.Text); mp.Update_PMP(pmpid, startdate, enddate); if (Label10.Text == "制定") { string err = RTXhelper.Send("ERP系统消息:" + Session["UserRole"] + "于" + DateTime.Now.ToString("F") + "提交了" + year + "年" + month + "月" + "的原始材料月计划,待您审核。", "材料月计划审核"); if (!string.IsNullOrEmpty(err)) { ScriptManager.RegisterStartupScript(this.Page, typeof(Page), "alert", err, true); } } if (Label10.Text == "新增") { string err = RTXhelper.Send("ERP系统消息:" + Session["UserRole"] + "于" + DateTime.Now.ToString("F") + "提交了" + year + "年" + month + "月" + "的新增材料月计划,待您审核。", "材料月计划审核"); if (!string.IsNullOrEmpty(err)) { ScriptManager.RegisterStartupScript(this.Page, typeof(Page), "alert", err, true); } } GridView1.DataSource = mp.Query_MPlan(syear, smonth, state, Convert.ToInt32(Linenum.Text)); GridView1.DataBind(); Panel3.Visible = false; Panel4.Visible = false; } }
//部门安排 protected void Button1_Com(object sender, EventArgs e) { try { string Pname; bool temp = false; Guid rd = new Guid(label_supplytypeid.Text); foreach (GridViewRow item in Gridview_Organization.Rows) { RadioButton rb = item.FindControl("RadioButtonMarkup") as RadioButton; if (rb.Checked) { Pname = Gridview_Organization.DataKeys[item.RowIndex].Value.ToString(); temp = true; prmp.InsertPRMP_ResponDepart(rd, Pname); } } if (!temp) { ScriptManager.RegisterClientScriptBlock(UpdatePanel_Organization, GetType(), "aa", "alert('请选择部门')", true); return; } else { TextBox22.Text = ""; Panel_Organization.Visible = false; BindGridView_Projectinfo(""); UpdatePanel2_Project.Update(); label_RTX.Text = "ERP系统信息:" + Session["UserName"].ToString() + "于" + DateTime.Now + "完成了" + Gridview2.Rows[Gridview2.SelectedIndex].Cells[2].Text.ToString() + "的项目部门设置,请提交材料。"; string message = label_RTX.Text; string dep = Gridview2.Rows[Gridview2.SelectedIndex].Cells[9].Text.ToString(); string sErr = RTXhelper.SendbyDepAndRole(message, dep, "项目材料维护"); if (!string.IsNullOrEmpty(sErr)) { ScriptManager.RegisterClientScriptBlock(Page, GetType(), "alert", "alert('" + sErr + "')", true); } } } catch (Exception) { throw; } }
//驳回 protected void Btn_Submit_Refuse_Click(object sender, EventArgs e) { Guid id = id_IQCDT_ID; string op = Txt_AuAug.Text; iQCBasicDataL.Update_IQCDT_Refuse(id, op); BindGrid1(Label30.Text); UpdatePanel_GridMaterial.Update(); ScriptManager.RegisterStartupScript(Page, typeof(Page), "alert", "alert('驳回成功,并已通知检验员!')", true); Panel_AddWorkOrder.Visible = false; UpdatePanel_AddWorkOrder.Update(); string remind = "ERP系统消息:" + Session["UserName"].ToString() + "于" + DateTime.Now.ToString("F") + "驳回了批号为:" + Label37.Text.ToString() + "的入库检验单,请在进料检验查看页面中重新录入检验结果!"; string sErr = RTXhelper.Send(remind, "进料检验维护"); if (!string.IsNullOrEmpty(sErr)) { ScriptManager.RegisterClientScriptBlock(Page, GetType(), "alert", "alert('" + sErr + "')", true); } }
protected void BtnSubmit1_Click(object sender, EventArgs e) { Guid id = new Guid(Label36.Text.ToString()); string result = Txt_CheckResult.SelectedValue.ToString(); string op = Txt_CheckSug.Text; string op1 = TextBox2.Text; iQCBasicDataL.Update_IQCDT_Result(id, result, op, op1); ScriptManager.RegisterStartupScript(Page, typeof(Page), "alert", "alert('提交成功!')", true); 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); } BindGrid1(Label30.Text); UpdatePanel_GridMaterial.Update(); }
protected void BtnOK_Click(object sender, EventArgs e) { HRPerformceDetailL hRPerformceDetailL = new HRPerformceDetailL(); HRPerformceDetailInfo neiaInfo1 = new HRPerformceDetailInfo(); HRPItemScoreL hRPItemScoreL = new HRPItemScoreL(); HRPItemScoreInfo neiaInfo2 = null; DateTime d1; if (DateTime.TryParse(TxtCheckTime.Text, out d1)) { neiaInfo1.HRPD_Atime = d1; } else { ScriptManager.RegisterClientScriptBlock(Page, typeof(Page), "alert", "alert('请输入格式正确的培训开始日期!')", true); return; } int count = GridView2.Rows.Count; for (int i = 0; i < count; i++) { TextBox tb1 = GridView2.Rows[i].FindControl("TxtRemarks") as TextBox;//取得所在行的是否合格的列 if (tb1.Text == "") { //tb1.Text = GridView2.Rows[i].Cells[] ScriptManager.RegisterClientScriptBlock(Page, typeof(Page), "alert", "alert('考核项目得分不能为空!')", true); flag = "不提交"; break; } else if (Int32.Parse(GridView2.Rows[i].Cells[3].Text) < Int32.Parse(tb1.Text)) { ScriptManager.RegisterClientScriptBlock(Page, typeof(Page), "alert", "alert('项目得分不能比标准得分高!')", true); flag = "不提交"; break; } else { flag = "提交"; } } if (CheckPerson.Text == "") { flag = "不提交"; ScriptManager.RegisterClientScriptBlock(Page, typeof(Page), "alert", "alert('请输入考核人!')", true); } if (flag == "提交") { neiaInfo1.HRDD_ID = new Guid(Label2.Text);//人事档案ID //Guid guid = Guid.NewGuid(); //LabelDetail.Text = guid.ToString(); neiaInfo1.HRPD_ID = new Guid(Label6.Text.ToString().Trim()); neiaInfo1.HRPD_APerson = CheckPerson.Text; neiaInfo1.HRPD_FinalScore = 0; neiaInfo1.HRPD_Month = Int32.Parse(LabelMonth.Text.ToString()); neiaInfo1.HRPD_Year = Int32.Parse(LabelYear.Text.ToString()); neiaInfo1.HRPD_State = false; neiaInfo1.HRPD_AState = true; //hRPerformceDetailL.Insert_HRPerformceDetail(neiaInfo1); //hRPerformceDetailL.Update_HRPerformceDetail(neiaInfo1); for (int j = 0; j < count; j++) { neiaInfo2 = new HRPItemScoreInfo(); TextBox tb2 = GridView2.Rows[j].FindControl("TxtRemarks") as TextBox;//取得所在行的是否合格的列 neiaInfo2.HRPI_ItemID = new Guid(GridView2.Rows[j].Cells[0].Text); neiaInfo2.HRPIS_ItemFScore = 0; neiaInfo2.HRPD_ID = neiaInfo1.HRPD_ID; neiaInfo2.HRPIS_ItemScore = Int32.Parse(tb2.Text); neiaInfo1.HRPD_FinalScore = neiaInfo1.HRPD_FinalScore + neiaInfo2.HRPIS_ItemScore; hRPItemScoreL.Insert_HRPItemScore(neiaInfo2); } hRPerformceDetailL.Update_HRPerformceDetail(neiaInfo1); Panel2.Visible = false; BindGridForEmployee(Grid_Detail, ""); UpdatePanel_SearchEmployee.Update(); ScriptManager.RegisterClientScriptBlock(Page, typeof(Page), "alert", "alert('已提交!')", true); int updateState = getReturnState(); if (updateState == 0) { yearInfo.HRP_A_State = "已录入"; //RTX string message = "ERP系统消息:" + Session["UserName"].ToString() + "于" + DateTime.Now.ToString("F") + "提交了绩效考核信息,请审核。"; string sErr = RTXhelper.Send(message, "绩效考核结果审核"); if (!string.IsNullOrEmpty(sErr)) { ScriptManager.RegisterStartupScript(Page, typeof(Page), "alert", "alert('" + sErr + "')", true); } } else { yearInfo.HRP_A_State = "录入中"; } yearInfo.HRPYear_ID = guidYear; yearInfo.HRP_Year = Int32.Parse(LabelYear.Text); yearInfo.HRP_Month = Int32.Parse(LabelMonth.Text); yearInfo.HRP_C_State = "未审核"; yearInfo.HRP_C_Person = ""; hRPerfYearL.Update_HRPerformceYear(yearInfo); if (Label18.Text == "检索前") { BindGrid1(""); } if (Label18.Text == "检索后") { BindGrid1(con2); } UpdatePanel1.Update(); } }
//提交 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); } }
//会签提交 protected void Btn_Intake(object sender, EventArgs e) { Guid OEMOT_ID = new Guid(Label_OEMOT_ID.Text.ToString()); string OEMOT_State = ""; if (Session["Department"].ToString() == "工程部") { string OEMOT_EnDepDirec = DropDownList1.SelectedValue; string OEMOT_EnDepReason = TextBox1.Text; string OEMOT_EnDepMan = Session["UserName"].ToString(); if (OEMOT_EnDepDirec == "是") { OEMOT_State = "工程部会签通过"; } else { OEMOT_State = "工程部会签驳回"; } odd.U_OEMOrderTrack_EnDesign(OEMOT_ID, OEMOT_EnDepDirec, OEMOT_EnDepReason, OEMOT_EnDepMan); } if (Session["Department"].ToString() == "技术部") { string OEMOT_TeDepDirec = DropDownList6.SelectedValue; string OEMOT_TeDepReason = TextBox2.Text.ToString(); string OEMOT_TeDepMan = Session["UserName"].ToString(); if (OEMOT_TeDepDirec == "是") { OEMOT_State = "技术部会签通过"; } else { OEMOT_State = "技术部会签驳回"; } odd.U_OEMOrderTrack_TeDesign(OEMOT_ID, OEMOT_TeDepDirec, OEMOT_TeDepReason, OEMOT_TeDepMan); } if (Session["Department"].ToString() == "品保部") { string OEMOT_QDepQC = DropDownList2.SelectedValue; string OEMOT_QDepReason = TextBox4.Text; string OEMOT_QDepMan = Session["UserName"].ToString(); if (OEMOT_QDepQC == "是") { OEMOT_State = "品保部会签通过"; } else { OEMOT_State = "品保部会签驳回"; } odd.U_OEMOrderTrack_QDesign(OEMOT_ID, OEMOT_QDepQC, OEMOT_QDepReason, OEMOT_QDepMan); } if (Session["Department"].ToString().Contains("生产")) { string OEMOT_PDepInDate = DropDownList3.SelectedValue; string OEMOT_PDepReason = TextBox6.Text; string OEMOT_PDepMan = Session["UserName"].ToString(); if (OEMOT_PDepInDate == "是") { OEMOT_State = "生产部会签通过"; } else { OEMOT_State = "生产部会签驳回"; } odd.U_OEMOrderTrack_PDesign(OEMOT_ID, OEMOT_PDepInDate, OEMOT_PDepReason, OEMOT_PDepMan); } if (Session["Department"].ToString() == "采购部") { string OEMOT_SupDepM = DropDownList4.SelectedValue; string OEMOT_SuDepReason = TextBox9.Text; string OEMOT_SuDepMan = Session["UserName"].ToString(); if (OEMOT_SupDepM == "是") { OEMOT_State = "采购部会签通过"; } else { OEMOT_State = "采购部会签驳回"; } odd.U_OEMOrderTrack_SupDesign(OEMOT_ID, OEMOT_SupDepM, OEMOT_SuDepReason, OEMOT_SuDepMan); } if (Session["Department"].ToString() == "销售部") { string OEMOT_SalDepSale = DropDownList5.SelectedValue; string OEMOT_SalDepReason = TextBox10.Text; string OEMOT_SalDepMan = Session["UserName"].ToString(); if (OEMOT_SalDepSale == "是") { OEMOT_State = "销售部会签通过"; } else { OEMOT_State = "销售部会签驳回"; } odd.U_OEMOrderTrack_SalDesign(OEMOT_ID, OEMOT_SalDepSale, OEMOT_SalDepReason, OEMOT_SalDepMan); } odd.U_OEMOrderTrack_State(OEMOT_ID, OEMOT_State); string condition = "and OEMOT_ID='" + Label_OEMOT_ID.Text.ToString() + "'"; DataSet ds = odd.S_OEMOrderTrack_One(condition); DataTable dt = ds.Tables[0]; if (dt.Rows.Count > 0) { try { DropDownList1.SelectedValue = dt.Rows[0][5].ToString(); } catch (Exception) { DropDownList1.SelectedIndex = 0; } try { DropDownList6.SelectedValue = dt.Rows[0][9].ToString(); } catch (Exception) { DropDownList6.SelectedIndex = 0; } try { DropDownList2.SelectedValue = dt.Rows[0][13].ToString(); } catch (Exception) { DropDownList2.SelectedIndex = 0; } try { DropDownList3.SelectedValue = dt.Rows[0][17].ToString(); } catch (Exception) { DropDownList3.SelectedIndex = 0; } try { DropDownList4.SelectedValue = dt.Rows[0][21].ToString(); } catch (Exception) { DropDownList4.SelectedIndex = 0; } try { DropDownList5.SelectedValue = dt.Rows[0][25].ToString(); } catch (Exception) { DropDownList5.SelectedIndex = 0; } } if (DropDownList1.SelectedValue == "是" && DropDownList2.SelectedValue == "是" && DropDownList3.SelectedValue == "是" && DropDownList4.SelectedValue == "是" && DropDownList5.SelectedValue == "是" && DropDownList6.SelectedValue == "是") { OEMOT_State = "会签通过"; odd.U_OEMOrderTrack_State(OEMOT_ID, OEMOT_State); label_RTX.Text = "ERP系统信息:" + Session["UserName"].ToString() + "于" + DateTime.Now + "通过了" + label_CursNum.Text + "的加工订单表会签,请查看。"; string message = label_RTX.Text; string sErr = RTXhelper.Send(message, "加工订单跟踪制定"); if (!string.IsNullOrEmpty(sErr)) { ScriptManager.RegisterClientScriptBlock(Page, GetType(), "alert", "alert('" + sErr + "')", true); } } if (DropDownList1.SelectedValue == "否" || DropDownList2.SelectedValue == "否" || DropDownList3.SelectedValue == "否" || DropDownList4.SelectedValue == "否" || DropDownList5.SelectedValue == "否" || DropDownList6.SelectedValue == "否") { label_RTX.Text = "ERP系统信息:" + Session["UserName"].ToString() + "于" + DateTime.Now + "驳回了" + label_CursNum.Text + "的加工订单表,请查看。"; string message = label_RTX.Text; string sErr = RTXhelper.Send(message, "加工订单跟踪制定"); if (!string.IsNullOrEmpty(sErr)) { ScriptManager.RegisterClientScriptBlock(Page, GetType(), "alert", "alert('" + sErr + "')", true); } } DropDownList1.SelectedValue = "是"; DropDownList2.SelectedValue = "是"; DropDownList3.SelectedValue = "是"; DropDownList4.SelectedValue = "是"; DropDownList5.SelectedValue = "是"; DropDownList6.SelectedValue = "是"; TextBox1.Text = ""; TextBox2.Text = ""; TextBox4.Text = ""; TextBox6.Text = ""; TextBox9.Text = ""; TextBox10.Text = ""; label13.Text = ""; label14.Text = ""; label15.Text = ""; label17.Text = ""; label5.Text = ""; label6.Text = ""; label7.Text = ""; label8.Text = ""; label9.Text = ""; label10.Text = ""; label11.Text = ""; label12.Text = ""; Panel3.Visible = false; UpdatePanel3.Update(); }
//提交外送样品 protected void Button1_Com1(object sender, EventArgs e) { if (TextBox4.Text != "") { CRMOutsideSampleinfo.CRMOS_Num = Convert.ToDecimal(TextBox4.Text.ToString()); } else { ScriptManager.RegisterClientScriptBlock(UpdatePanel_SampleNew, GetType(), "alert", "alert('标记*的为必填项,请填写完整!')", true); return; } if (TextBox2.Text != "") { CRMOutsideSampleinfo.CRMOS_AlertDay = Convert.ToInt16(TextBox2.Text.ToString()); } else { ScriptManager.RegisterClientScriptBlock(UpdatePanel_SampleNew, GetType(), "alert", "alert('标记*的为必填项,请填写完整!')", true); return; } if (TextBox6.Text != "") { CRMOutsideSampleinfo.CRMOS_Factory = TextBox6.Text.ToString(); } else { ScriptManager.RegisterClientScriptBlock(UpdatePanel_SampleNew, GetType(), "alert", "alert('标记*的为必填项,请填写完整!')", true); return; } if (DropDownList4.SelectedValue != "请选择") { CRMOutsideSampleinfo.CRMOS_AnalysisReport = DropDownList4.SelectedValue.ToString(); } else { ScriptManager.RegisterClientScriptBlock(UpdatePanel_SampleNew, GetType(), "alert", "alert('标记*的为必填项,请填写完整!')", true); return; } if (TextBox7.Text != "") { CRMOutsideSampleinfo.CRMOS_Remark = TextBox7.Text.ToString(); } CRMOutsideSampleinfo.CRMOS_State = "已提交"; if (label_New.Text == "新增外送样品") { CRMOutsideSampleinfo.CRMOS_State = "已提交"; string man = Session["UserName"].ToString(); cs.InsertCRMOutsideSample(CRMOutsideSampleinfo, man); } else { CRMOutsideSampleinfo.CRMOS_ID = new Guid(label_SampleID.Text.ToString()); cs.UpdateCRMOutsideSample(CRMOutsideSampleinfo); } TextBox4.Text = ""; TextBox2.Text = ""; TextBox6.Text = ""; DropDownList4.SelectedValue = "请选择"; TextBox7.Text = ""; Panel_SampleNew.Visible = false; UpdatePanel_SampleNew.Update(); BindGridview1(""); UpdatePanel_OutWeb.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); } }