//绑定GridView private void BindGridView() { try { string sql = GetSqlWhere(); if (string.IsNullOrEmpty(sql)) { this.PrintfError("请选择查询条件!"); return; } string sortEx = this.grvWGD.Attributes["SortExpression"]; string sortDirect = this.grvWGD.Attributes["SortDirection"]; string strSort = (!string.IsNullOrEmpty(sortEx)) ? sortEx + " " + sortDirect : ""; DataSet ds = WGDQuery.QueryWGD(sql, strSort, PageControl1.GetPageSize(), PageControl1.GetCurrPage()); this.grvWGD.DataSource = ds; this.grvWGD.DataBind(); SetSumInfo(); this.SetDisplayList1.InitSetListControl(this.grvWGD, SysBaseConfig.WGD_Q_PAGE); this.SetDisplayList1.SetGridViewDisplay(grvWGD); } catch (Exception ex) { String strEx = ex.Message; this.PrintfError("数据访问错误,请重试!"); } }
private void SetOperForm() { this.WGDCount = WGDQuery.GetExeWGDCount(); this.FYDCount = FYDQuery.GetExeFYDCount(); this.XTZHCount = XTZHQuery.GetExeXTZHCount(); this.PDDCount = PDParam.GetExePDDCount(); this.YKDCount = ZKDQuery.GetExeZKDCount(); }
protected void btnResend_Click(object sender, ImageClickEventArgs e) { try { int rowIndex = Convert.ToInt32(this.hidRowIndex.Value.Trim()); Label lblDoc = (Label)this.grdLog.Rows[rowIndex].Cells[0].FindControl("lblDocID"); if (!this.CUSER.USERFUNCTION.RESENDBILL) { this.PrintfError("对不起,您没有重发单据的权限!"); return; } if (string.IsNullOrEmpty(this.hidRowIndex.Value)) { this.PrintfError("没有选择的单据!"); return; } string docType = this.grdLog.Rows[rowIndex].Cells[3].Text.Trim(); if (docType == "4R") { this.PrintfError("盘点单据的重发需在【盘点数据上传】模块处理!"); return; } if (docType == "A4") { string strWGD = lblDoc.Text.Trim(); DataSet ds = WGDQuery.GetWGDInfo(strWGD); if (ds == null || Convert.ToInt32(ds.Tables[0].Rows[0]["wcbz"]) != 3) { this.PrintfError("该完工单尚未完成入库,不能重发"); return; } } string docID = lblDoc.Text.Trim(); string ck = this.grdLog.Rows[rowIndex].Cells[2].Text.Split('|')[0].Trim(); int result = DataOperClass.ResendData(docID, docType, this.CUSER.UserID, ck); if (result == -1) { this.PrintfError("重发失败,请重试!"); return; } this.PrintfError("单据重发完毕!"); } catch { this.PrintfError("数据访问错误!"); return; } }
//设置总计信息和跑钩数 private void SetSumInfo() { if (this.grvWGD.Rows.Count > 0) { this.labCount.Text = PageControl1.GetRecordCount().ToString(); try { this.lblPaoGou.Text = WGDQuery.GetPaoGouCount(GetSqlWhere()).ToString(); } catch { this.lblPaoGou.Text = "0"; } } }
//设置分页控件显示 private void SetPageCountView() { try { string sqlWhere = GetSqlWhere(); int outCount; int pageCount = WGDQuery.GetPageCount(sqlWhere, PageControl1.GetPageSize(), out outCount); PageControl1.SetInitView(pageCount, outCount); } catch { this.PrintfError("数据访问错误,请重试!"); return; } }
private string GetSqlWhere() { string sqlWhere = ""; //批次号 if (!string.IsNullOrEmpty(hidPCH.Value)) { if (!string.IsNullOrEmpty(sqlWhere)) { sqlWhere += " AND PCH like '%" + hidPCH.Value + "%'"; } else { sqlWhere += " and PCH like '%" + hidPCH.Value + "%'"; } } //生产线 if (!string.IsNullOrEmpty(this.hidSCX.Value)) { string tempStr = "ACCTRUE"; string strSCXID = WGDQuery.GetSCXID(this.hidSCX.Value.Trim()); if (!string.IsNullOrEmpty(strSCXID)) { tempStr = strSCXID; } if (!string.IsNullOrEmpty(sqlWhere)) { sqlWhere += " AND SCX" + (this.Drptj.SelectedValue.Trim()) + "'" + tempStr + "'"; } else { sqlWhere += " and SCX " + this.Drptj.SelectedValue.Trim() + "'" + tempStr + "'"; } } if (this.chkyzj.Checked) { sqlWhere += " and zjbz=1 "; } else { sqlWhere += " and zjbz=0 "; } sqlWhere = " and wcbz=0 " + sqlWhere; return(sqlWhere); }
//导出EXCEL protected void imgBtnExcel_Click(object sender, ImageClickEventArgs e) { if (this.grvWGD.Rows.Count < 1) { this.PrintfError("没有要导出的数据!"); } try { string sqlWhere = GetSqlWhere(); DataSet ds = WGDQuery.QueryWGDExcel(sqlWhere); if (ds != null) { this.CreateExcel(ds.Tables[0], "WGD.xls", PageControl1.GetRecordCount()); } } catch { this.PrintfError("数据访问错误,请重试!"); return; } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { if (Request["WGDH"] != null) { string strWGDH = Request["WGDH"]; try { DataSet ds = WGDQuery.GetWGDItems(strWGDH); this.grdGridList.DataSource = ds; this.grdGridList.DataBind(); } catch { this.PrintfError("数据访问失败!"); return; } } } }
private string CreateUrl() { StringBuilder sb = new StringBuilder(); sb.Append("PrintWGD.aspx?TYPE=1"); if (this.grvWGD.Columns[1].Visible == false) { sb.Append("&ISWGDH=true"); } if (this.grvWGD.Columns[2].Visible == false) { sb.Append("&ISSCX=true"); } if (this.grvWGD.Columns[3].Visible == false) { sb.Append("&ISPC=true"); } if (this.grvWGD.Columns[4].Visible == false) { sb.Append("&ISPCSX=true"); } if (this.grvWGD.Columns[5].Visible == false) { sb.Append("&ISTSXX=true"); } if (this.grvWGD.Columns[6].Visible == false) { sb.Append("&ISPCLX=true"); } if (this.grvWGD.Columns[7].Visible == false) { sb.Append("&ISPH=true"); } if (this.grvWGD.Columns[8].Visible == false) { sb.Append("&ISGG=true"); } if (this.grvWGD.Columns[9].Visible == false) { sb.Append("&ISWLH=true"); } if (this.grvWGD.Columns[10].Visible == false) { sb.Append("&ISWLMC=true"); } if (this.grvWGD.Columns[11].Visible == false) { sb.Append("&ISZXBZ=true"); } if (this.grvWGD.Columns[12].Visible == false) { sb.Append("&ISFZDW=true"); } if (this.grvWGD.Columns[13].Visible == false) { sb.Append("&ISPCXH=true"); } if (this.grvWGD.Columns[14].Visible == false) { sb.Append("&ISZJBZ=true"); } if (this.grvWGD.Columns[15].Visible == false) { sb.Append("&ISPGSM=true"); } if (this.grvWGD.Columns[16].Visible == false) { sb.Append("&ISJSSJ=true"); } if (this.grvWGD.Columns[17].Visible == false) { sb.Append("&ISSCWC=true"); } if (this.grvWGD.Columns[18].Visible == false) { sb.Append("&ISRKWC=true"); } if (this.grvWGD.Columns[19].Visible == false) { sb.Append("&ISDJZT=true"); } if (this.grvWGD.Columns[20].Visible == false) { sb.Append("&ISBB=true"); } if (!string.IsNullOrEmpty(hidWGDH.Value)) { sb.Append("&WGDH=" + hidWGDH.Value); } //批次号 if (!string.IsNullOrEmpty(hidPCH.Value)) { sb.Append("&PCH=" + hidPCH.Value); } //质检人 if (!string.IsNullOrEmpty(this.hidZJR.Value)) { string[] strZJR = this.hidZJR.Value.Split('|'); sb.Append("&ZJR=" + strZJR[0].Trim()); } //特殊信息 if (!string.IsNullOrEmpty(this.hidTSXX.Value)) { sb.Append("&TSXX=" + this.hidTSXX.Value); } //批次类型 if (!string.IsNullOrEmpty(hidPLX.Value)) { sb.Append("&PCLX=" + this.hidPLX.Value); } //批次属性 if (!string.IsNullOrEmpty(hidPCSX.Value)) { sb.Append("&PCSX=" + this.hidPCSX.Value); } //物料号 if (!string.IsNullOrEmpty(hidWLH.Value)) { sb.Append("&WLH=" + this.hidWLH.Value); } //生产线 if (!string.IsNullOrEmpty(this.hidSCX.Value)) { string tempStr = "ACCTRUE"; string strSCXID = WGDQuery.GetSCXID(this.hidSCX.Value.Trim()); if (!string.IsNullOrEmpty(strSCXID)) { tempStr = strSCXID; } sb.Append("&SCX=" + tempStr); } //完成标志 if (!string.IsNullOrEmpty(this.hidWCBZ.Value)) { sb.Append("&WCBZ=" + hidWCBZ.Value); } //牌号 if (!string.IsNullOrEmpty(this.hidPH.Value)) { sb.Append("&PH=" + hidPH.Value); } //待判 if (!string.IsNullOrEmpty(this.hidDPP.Value)) { sb.Append("&DP=" + this.hidDPP.Value); } //规格 if (!string.IsNullOrEmpty(hidGG.Value)) { sb.Append("&GG=" + this.hidGG.Value); } //生产开始时间 if (this.chkPTime.Checked && !string.IsNullOrEmpty(txtPStartTime.Text.Trim())) { string startTime = this.txtPStartTime.Text.Trim() + " 00:00:00"; sb.Append("&SCKS=" + startTime); } //生产结束时间 if (this.chkPTime.Checked && !string.IsNullOrEmpty(txtPEndTime.Text.Trim())) { string endTime = this.txtPEndTime.Text.Trim() + " 23:59:59"; sb.Append("&SCJS=" + endTime); } //入库完成时间 if (this.chkRTime.Checked && !string.IsNullOrEmpty(txtRStartTime.Text.Trim())) { string startTime = this.txtRStartTime.Text.Trim() + " 00:00:00"; sb.Append("&RKWC=" + startTime); } //入库结束时间 if (this.chkRTime.Checked && !string.IsNullOrEmpty(txtREndTime.Text.Trim())) { string endTime = this.txtREndTime.Text.Trim() + " 23:59:59"; sb.Append("&RKJS=" + endTime); } if (this.chkPaoGou.Checked) { sb.Append("&PGBZ=1"); } return(sb.ToString()); }
//获取查询条件 private string GetSqlWhere() { string sqlWhere = ""; if (!string.IsNullOrEmpty(hidWGDH.Value) && this.chkWGDH.Checked) { sqlWhere += "a.WGDH like '%" + hidWGDH.Value + "%' "; } else { this.hidWGDH.Value = ""; this.drpWGDH.Text = ""; } //批次号 if (!string.IsNullOrEmpty(hidPCH.Value) && this.chkPCH.Checked) { if (!string.IsNullOrEmpty(sqlWhere)) { sqlWhere += " AND a.PCH like '%" + hidPCH.Value + "%'"; } else { sqlWhere += " a.PCH like '%" + hidPCH.Value + "%'"; } } else { this.hidPCH.Value = ""; this.drpPCH.Text = ""; } //质检人 if (!string.IsNullOrEmpty(this.hidZJR.Value)) { string[] strZJR = this.hidZJR.Value.Split('|'); if (!string.IsNullOrEmpty(sqlWhere)) { sqlWhere += " AND a.NCWLBMID ='" + strZJR[0].Trim() + "'"; } else { sqlWhere += " a.NCWLBMID ='" + strZJR[0].Trim() + "'"; } } //特殊信息 if (!string.IsNullOrEmpty(this.hidTSXX.Value) && this.chkTSXX.Checked) { if (!string.IsNullOrEmpty(sqlWhere)) { sqlWhere += " AND a.pcinfo like '%" + this.hidTSXX.Value.Trim() + "%'"; } else { sqlWhere += " a.pcinfo like '%" + this.hidTSXX.Value.Trim() + "%'"; } } else { this.hidTSXX.Value = ""; this.drpTSXX.Text = ""; } //批次类型 if (!string.IsNullOrEmpty(hidPLX.Value)) { if (!string.IsNullOrEmpty(sqlWhere)) { sqlWhere += " AND a.PCLX=" + hidPLX.Value.Trim(); } else { sqlWhere += " a.PCLX =" + hidPLX.Value.Trim(); } } //批次属性 if (!string.IsNullOrEmpty(hidPCSX.Value)) { if (!string.IsNullOrEmpty(sqlWhere)) { sqlWhere += " AND a.PCSX='" + hidPCSX.Value.Trim() + "'"; } else { sqlWhere += " a.PCSX ='" + hidPCSX.Value.Trim() + "'"; } } //物料号 if (!string.IsNullOrEmpty(hidWLH.Value) && this.chkWLH.Checked) { if (!string.IsNullOrEmpty(sqlWhere)) { sqlWhere += " AND a.WLH like '%" + hidWLH.Value.Trim() + "%'"; } else { sqlWhere += " a.WLH like '%" + hidWLH.Value.Trim() + "%'"; } } else { this.hidWLH.Value = ""; this.drpWLH.Text = ""; } //生产线 if (!string.IsNullOrEmpty(this.hidSCX.Value)) { string tempStr = "ACCTRUE"; string strSCXID = WGDQuery.GetSCXID(this.hidSCX.Value.Trim()); if (!string.IsNullOrEmpty(strSCXID)) { tempStr = strSCXID; } if (!string.IsNullOrEmpty(sqlWhere)) { sqlWhere += " AND a.SCX='" + tempStr + "'"; } else { sqlWhere += " a.SCX ='" + tempStr + "'"; } } //完成标志 if (!string.IsNullOrEmpty(this.hidWCBZ.Value)) { if (!string.IsNullOrEmpty(sqlWhere)) { sqlWhere += " AND a.wcbz=" + this.hidWCBZ.Value.Trim(); } else { sqlWhere += " a.wcbz =" + this.hidWCBZ.Value.Trim(); } } //牌号 if (!string.IsNullOrEmpty(this.hidPH.Value) && this.chkPH.Checked) { if (!string.IsNullOrEmpty(sqlWhere)) { sqlWhere += " AND a.PH like '%" + this.hidPH.Value.Trim() + "%'"; } else { sqlWhere += " a.PH like '%" + this.hidPH.Value.Trim() + "%'"; } } else { this.hidPH.Value = ""; this.drpPH.Text = ""; } //待判 if (!string.IsNullOrEmpty(this.hidDPP.Value)) { if (!string.IsNullOrEmpty(sqlWhere)) { sqlWhere += " AND a.pcsx ='DP' and a.zpdjbz='" + this.hidDPP.Value.Trim() + "'"; } else { sqlWhere += " a.pcsx ='DP' and a.zpdjbz='" + this.hidDPP.Value.Trim() + "'"; } } //规格 if (!string.IsNullOrEmpty(hidGG.Value) && this.chkGG.Checked) { if (!string.IsNullOrEmpty(sqlWhere)) { sqlWhere += " AND a.GG like '%" + hidGG.Value.Trim() + "%'"; } else { sqlWhere += " a.GG like '%" + hidGG.Value.Trim() + "%'"; } } else { this.hidGG.Value = ""; this.drpGG.Text = ""; } //生产开始时间 if (this.chkPTime.Checked && !string.IsNullOrEmpty(txtPStartTime.Text.Trim())) { string startTime = this.txtPStartTime.Text.Trim() + " 00:00:00"; if (!string.IsNullOrEmpty(sqlWhere)) { sqlWhere += " AND a.PEnd_Time >='" + startTime + "'"; } else { sqlWhere += " a.PEnd_Time >='" + startTime + "'"; } } //生产结束时间 if (this.chkPTime.Checked && !string.IsNullOrEmpty(txtPEndTime.Text.Trim())) { string endTime = this.txtPEndTime.Text.Trim() + " 23:59:59"; if (!string.IsNullOrEmpty(sqlWhere)) { sqlWhere += " AND a.PEnd_Time<='" + endTime + "'"; } else { sqlWhere += " a.PEnd_Time<='" + endTime + "'"; } } //入库完成时间 if (this.chkRTime.Checked && !string.IsNullOrEmpty(txtRStartTime.Text.Trim())) { string startTime = this.txtRStartTime.Text.Trim() + " 00:00:00"; if (!string.IsNullOrEmpty(sqlWhere)) { sqlWhere += " AND a.End_Time >='" + startTime + "'"; } else { sqlWhere += " a.End_Time >='" + startTime + "'"; } } //入库结束时间 if (this.chkRTime.Checked && !string.IsNullOrEmpty(txtREndTime.Text.Trim())) { string endTime = this.txtREndTime.Text.Trim() + " 23:59:59"; if (!string.IsNullOrEmpty(sqlWhere)) { sqlWhere += " AND a.End_Time<='" + endTime + "'"; } else { sqlWhere += " a.End_Time<='" + endTime + "'"; } } if (this.chkPaoGou.Checked) { if (!string.IsNullOrEmpty(sqlWhere)) { sqlWhere += " and a.PGBZ > 0 "; } else { sqlWhere += " a.PGBZ > 0 "; } } if (this.chkFree1.Checked) { if (!string.IsNullOrEmpty(sqlWhere)) { sqlWhere += " and a.vfree0 like '%" + this.txtFree1.Text + "%'"; } else { sqlWhere += " a.vfree0 like '%" + this.txtFree1.Text + "%'"; } } if (this.chkFree2.Checked) { if (!string.IsNullOrEmpty(sqlWhere)) { sqlWhere += " and a.vfree1 like '%" + this.txtFree2.Text + "%'"; } else { sqlWhere += " a.vfree1 like '%" + this.txtFree2.Text + "%'"; } } if (this.chkFree3.Checked) { if (!string.IsNullOrEmpty(sqlWhere)) { sqlWhere += " and a.vfree2 like '%" + this.txtFree3.Text + "%'"; } else { sqlWhere += " a.vfree2 like '%" + this.txtFree3.Text + "%'"; } } return(sqlWhere); }
protected void Page_Load(object sender, EventArgs e) { if (!string.IsNullOrEmpty(Request["TYPE"])) { string type = Request["TYPE"]; switch (type) { case "1": //打印完工单 if (!string.IsNullOrEmpty(Request["QUERYSQL"])) { try { DataSet ds = WGDQuery.QueryWGDExcel(Request["QUERYSQL"]); string strPrin = this.DGPrint(ds.Tables[0]); Response.Write(strPrin); } catch { return; } } break; case "2": //打印IC卡信息 try { DataSet ds = ICParam.GetPrintDS(Request["QUERYSQL"]); string strPrin = this.DGPrint(ds.Tables[0]); Response.Write(strPrin); } catch { return; } break; case "3": //打印发运单(进出门管理的查看发运单模块) try { DataSet ds1 = InDoorParam.GetPrintDS(Request["QUERYSQL"]); string strPrin1 = this.DGPrint(ds1.Tables[0]); Response.Write(strPrin1); } catch { return; } break; case "4": //打印发运单(查询) break; case "5": //打印转库单(查询) try { DataSet ds = ZKDQuery.QueryZKDExcel(Request["QUERYSQL"]); string strPrin = this.DGPrint(ds.Tables[0]); Response.Write(strPrin); } catch { return; } break; case "6": //打印移位单(查询) try { DataSet ds = YWDQuery.QueryYWDExcel(Request["QUERYSQL"]); string strPrin = this.DGPrint(ds.Tables[0]); Response.Write(strPrin); } catch { return; } break; case "7": //打印退货单(查询) try { DataSet ds = THDQuery.QueryTHDExcel(Request["QUERYSQL"]); string strPrin = this.DGPrint(ds.Tables[0]); Response.Write(strPrin); } catch { return; } break; case "8": //打印待判品查询单(查询) try { DataSet ds = DPPQuery.QueryPDDExcel(Request["QUERYSQL"]); string strPrin = this.DGPrint(ds.Tables[0]); Response.Write(strPrin); } catch { return; } break; case "9": //打印入库账簿单(查询) try { DataSet ds = RKZBQuery.QueryRKZBExcel(Request["QUERYSQL"]); string strPrin = this.DGPrint(ds.Tables[0]); Response.Write(strPrin); } catch { return; } break; case "10": //打印出库账簿单(查询) try { DataSet ds = CKZBQuery.QueryCKZBExcel(Request["QUERYSQL"]); string strPrin = this.DGPrint(ds.Tables[0]); Response.Write(strPrin); } catch { return; } break; } } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { string type = ""; if (Request["TYPE"] == null) { return; } type = Request["TYPE"]; switch (type) { case "1": //获取完工单查询的批次号条件 DataSet ds = null; try { ds = WGDQuery.GetPCHTerm(); } catch (Exception ex) { string a = ex.Message; Response.Write("ERROR"); } if (ds != null) { try { XmlTextWriter writer = new XmlTextWriter(Response.OutputStream, Response.ContentEncoding); writer.Formatting = Formatting.Indented; writer.Indentation = 4; writer.IndentChar = ' '; ds.WriteXml(writer); writer.Flush(); writer.Close(); Response.End(); } catch { } } break; case "2": //获取完工单查询的特殊信息条件 DataSet ds2 = null; try { string pchXX = ""; if (!string.IsNullOrEmpty(Request["PCH"])) { pchXX = Request["PCH"]; } ds2 = WGDQuery.GetPCInfo(pchXX); } catch (Exception ex) { string a = ex.Message; Response.Write("ERROR"); } if (ds2 != null) { try { XmlTextWriter writer = new XmlTextWriter(Response.OutputStream, Response.ContentEncoding); writer.Formatting = Formatting.Indented; writer.Indentation = 4; writer.IndentChar = ' '; ds2.WriteXml(writer); writer.Flush(); writer.Close(); Response.End(); } catch { } } break; case "3": //批次属性的查询条件 DataSet ds3 = null; try { ds3 = WGDQuery.GetPCSX(); } catch (Exception ex) { string a = ex.Message; Response.Write("ERROR"); } if (ds3 != null) { try { XmlTextWriter writer = new XmlTextWriter(Response.OutputStream, Response.ContentEncoding); writer.Formatting = Formatting.Indented; writer.Indentation = 4; writer.IndentChar = ' '; ds3.WriteXml(writer); writer.Flush(); writer.Close(); Response.End(); } catch { } } break; case "4": //物料号的查询条件 DataSet ds4 = null; try { ds4 = WGDQuery.GetWLH(); } catch (Exception ex) { string a = ex.Message; Response.Write("ERROR"); } if (ds4 != null) { try { XmlTextWriter writer = new XmlTextWriter(Response.OutputStream, Response.ContentEncoding); writer.Formatting = Formatting.Indented; writer.Indentation = 4; writer.IndentChar = ' '; ds4.WriteXml(writer); writer.Flush(); writer.Close(); Response.End(); } catch { } } break; case "5": //生产线 DataSet ds5 = null; try { ds5 = WGDQuery.GetSCX(); } catch (Exception ex) { string a = ex.Message; Response.Write("ERROR"); } if (ds5 != null) { try { XmlTextWriter writer = new XmlTextWriter(Response.OutputStream, Response.ContentEncoding); writer.Formatting = Formatting.Indented; writer.Indentation = 4; writer.IndentChar = ' '; ds5.WriteXml(writer); writer.Flush(); writer.Close(); Response.End(); } catch { } } break; case "6": //生产线 DataSet ds6 = null; try { ds6 = WGDQuery.GetPH(); } catch (Exception ex) { string a = ex.Message; Response.Write("ERROR"); } if (ds6 != null) { try { XmlTextWriter writer = new XmlTextWriter(Response.OutputStream, Response.ContentEncoding); writer.Formatting = Formatting.Indented; writer.Indentation = 4; writer.IndentChar = ' '; ds6.WriteXml(writer); writer.Flush(); writer.Close(); Response.End(); } catch { } } break; case "7": //规格 DataSet ds7 = null; try { ds7 = WGDQuery.GetGG(); } catch (Exception ex) { string a = ex.Message; Response.Write("ERROR"); } if (ds7 != null) { try { XmlTextWriter writer = new XmlTextWriter(Response.OutputStream, Response.ContentEncoding); writer.Formatting = Formatting.Indented; writer.Indentation = 4; writer.IndentChar = ' '; ds7.WriteXml(writer); writer.Flush(); writer.Close(); Response.End(); } catch { } } break; case "8": //完工单号 DataSet ds8 = null; try { ds8 = WGDQuery.GetWGDH(); } catch (Exception ex) { string a = ex.Message; Response.Write("ERROR"); } if (ds8 != null) { try { XmlTextWriter writer = new XmlTextWriter(Response.OutputStream, Response.ContentEncoding); writer.Formatting = Formatting.Indented; writer.Indentation = 4; writer.IndentChar = ' '; ds8.WriteXml(writer); writer.Flush(); writer.Close(); Response.End(); } catch { } } break; case "9": //完工单号 DataSet ds9 = null; try { ds9 = WGDQuery.GetZJR(); } catch (Exception ex) { string a = ex.Message; Response.Write("ERROR"); } if (ds9 != null) { try { XmlTextWriter writer = new XmlTextWriter(Response.OutputStream, Response.ContentEncoding); writer.Formatting = Formatting.Indented; writer.Indentation = 4; writer.IndentChar = ' '; ds9.WriteXml(writer); writer.Flush(); writer.Close(); Response.End(); } catch { } } break; case "10": DataSet ds10 = null; string fFYDH = Request["fydh"].ToString(); string fck = Request["ck"].ToString(); string fstrWLH = Request["wlh"].ToString(); string fstrSX = Request["sx"].ToString(); string fstrVfree1 = Request["vfree1"].ToString(); string fstrVfree2 = Request["vfree2"].ToString(); string fstrVfree3 = Request["vfree3"].ToString(); string res10 = ""; try { ds10 = FYDQuery.GetQueryFYDKYHW(fFYDH, fck, fstrWLH, fstrSX, fstrVfree1, fstrVfree2, fstrVfree3); // <th>仓库</th> //<th>货位</th> //<th>物料号</th> //<th>物料名称</th> //<th>属性</th> //<th>牌号</th> //<th>规格</th> //<th>特殊信息</th> //<th>重量</th> //<th>数量</th> //<th>自由项1</th> //<th>自由项2</th> //<th>自由项3</th> res10 = "<table width=\"800px;\" id=\"grvstand\" border=\"1\" cellpadding=\"1\" cellspacing=\"0\" bordercolor =\"#dce8f4\">" + "<thead id=\"djlist\">" + "<tr>" + "<th bgcolor=\"#dce8f4\">仓库</th>" + "<th bgcolor=\"#dce8f4\">货位</th>" + "<th bgcolor=\"#dce8f4\">物料号</th>" + "<th bgcolor=\"#dce8f4\" width=\"120px\">称重日期</th>" + "<th bgcolor=\"#dce8f4\">物料名称</th>" + "<th bgcolor=\"#dce8f4\">批次号</th>" + "<th bgcolor=\"#dce8f4\">属性</th>" + "<th bgcolor=\"#dce8f4\">牌号</th>" + "<th bgcolor=\"#dce8f4\">规格</th>" + "<th bgcolor=\"#dce8f4\">特殊信息</th>" + "<th bgcolor=\"#dce8f4\">重量</th>" + "<th bgcolor=\"#dce8f4\">数量</th>" + "<th bgcolor=\"#dce8f4\">自由项1</th>" + "<th bgcolor=\"#dce8f4\">自由项2</th>" + "<th bgcolor=\"#dce8f4\">自由项3</th>" + "</tr>" + "</thead><tbody id=\"djlist\">"; if (ds10 != null && ds10.Tables.Count > 0 && ds10.Tables[0].Rows.Count > 0) { foreach (DataRow dr in ds10.Tables[0].Rows) { res10 += "<tr><td>" + dr["ck"].ToString() + "</td><td>" + dr["hw"].ToString() + "</td><td>" + dr["wlh"].ToString() + "</td><td>" + dr["rq"].ToString() + "</td><td>" + dr["wlmc"].ToString() + "</td><td>" + dr["pch"].ToString() + "</td><td>" + dr["sx"].ToString() + "</td><td>" + dr["ph"].ToString() + "</td><td>" + dr["gg"].ToString() + "</td><td>" + dr["pcinfo"].ToString() + "</td><td>" + dr["zls"].ToString() + "</td><td>" + dr["num"].ToString() + "</td><td>" + dr["vfree1"].ToString() + "</td><td>" + dr["vfree2"].ToString() + "</td><td>" + dr["vfree3"].ToString() + "</td></tr>"; } } res10 += "</tbody></table>"; } catch (System.Exception ex) { res10 = "ERROR" + ex.Message; } Response.Write(res10); Response.End(); break; } } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { string type = ""; string fname = ""; if (Request["TYPE"] == null) { return; } type = Request["TYPE"]; fname = Request["fname"]; if (fname != null) { fname = fname.Trim(); } switch (type) { case "1": //获取完工单查询的批次号条件 DataSet ds = null; try { ds = WGDQuery.GetPCHTerm(); } catch (Exception ex) { string a = ex.Message; Response.Write("ERROR"); } if (ds != null) { try { XmlTextWriter writer = new XmlTextWriter(Response.OutputStream, Response.ContentEncoding); writer.Formatting = Formatting.Indented; writer.Indentation = 4; writer.IndentChar = ' '; ds.WriteXml(writer); writer.Flush(); writer.Close(); Response.End(); } catch { } } break; case "2": //获取完工单查询的特殊信息条件 DataSet ds2 = null; try { string pchXX = ""; if (!string.IsNullOrEmpty(Request["PCH"])) { pchXX = Request["PCH"]; } ds2 = WGDQuery.GetPCInfo(pchXX); } catch (Exception ex) { string a = ex.Message; Response.Write("ERROR"); } if (ds2 != null) { try { XmlTextWriter writer = new XmlTextWriter(Response.OutputStream, Response.ContentEncoding); writer.Formatting = Formatting.Indented; writer.Indentation = 4; writer.IndentChar = ' '; ds2.WriteXml(writer); writer.Flush(); writer.Close(); Response.End(); } catch { } } break; case "3": //批次属性的查询条件 DataSet ds3 = null; try { ds3 = WGDQuery.GetPCSX(); } catch (Exception ex) { string a = ex.Message; Response.Write("ERROR"); } if (ds3 != null) { try { XmlTextWriter writer = new XmlTextWriter(Response.OutputStream, Response.ContentEncoding); writer.Formatting = Formatting.Indented; writer.Indentation = 4; writer.IndentChar = ' '; ds3.WriteXml(writer); writer.Flush(); writer.Close(); Response.End(); } catch { } } break; case "4": //物料号的查询条件 DataSet ds4 = null; try { ds4 = WGDQuery.GetWLH(); } catch (Exception ex) { string a = ex.Message; Response.Write("ERROR"); } if (ds4 != null) { try { XmlTextWriter writer = new XmlTextWriter(Response.OutputStream, Response.ContentEncoding); writer.Formatting = Formatting.Indented; writer.Indentation = 4; writer.IndentChar = ' '; ds4.WriteXml(writer); writer.Flush(); writer.Close(); Response.End(); } catch { } } break; case "5": //生产线 DataSet ds5 = null; try { ds5 = WGDQuery.GetSCX(); } catch (Exception ex) { string a = ex.Message; Response.Write("ERROR"); } if (ds5 != null) { try { XmlTextWriter writer = new XmlTextWriter(Response.OutputStream, Response.ContentEncoding); writer.Formatting = Formatting.Indented; writer.Indentation = 4; writer.IndentChar = ' '; ds5.WriteXml(writer); writer.Flush(); writer.Close(); Response.End(); } catch { } } break; case "6": //生产线 DataSet ds6 = null; try { ds6 = WGDQuery.GetPH(); } catch (Exception ex) { string a = ex.Message; Response.Write("ERROR"); } if (ds6 != null) { try { XmlTextWriter writer = new XmlTextWriter(Response.OutputStream, Response.ContentEncoding); writer.Formatting = Formatting.Indented; writer.Indentation = 4; writer.IndentChar = ' '; ds6.WriteXml(writer); writer.Flush(); writer.Close(); Response.End(); } catch { } } break; case "7": //规格 DataSet ds7 = null; try { ds7 = WGDQuery.GetGG(); } catch (Exception ex) { string a = ex.Message; Response.Write("ERROR"); } if (ds7 != null) { try { XmlTextWriter writer = new XmlTextWriter(Response.OutputStream, Response.ContentEncoding); writer.Formatting = Formatting.Indented; writer.Indentation = 4; writer.IndentChar = ' '; ds7.WriteXml(writer); writer.Flush(); writer.Close(); Response.End(); } catch { } } break; case "8": //完工单号 DataSet ds8 = null; try { ds8 = WGDQuery.GetWGDH(); } catch (Exception ex) { string a = ex.Message; Response.Write("ERROR"); } if (ds8 != null) { try { XmlTextWriter writer = new XmlTextWriter(Response.OutputStream, Response.ContentEncoding); writer.Formatting = Formatting.Indented; writer.Indentation = 4; writer.IndentChar = ' '; ds8.WriteXml(writer); writer.Flush(); writer.Close(); Response.End(); } catch { } } break; case "9": //完工单号 DataSet ds9 = null; try { ds9 = WGDQuery.GetZJR(); } catch (Exception ex) { string a = ex.Message; Response.Write("ERROR"); } if (ds9 != null) { try { XmlTextWriter writer = new XmlTextWriter(Response.OutputStream, Response.ContentEncoding); writer.Formatting = Formatting.Indented; writer.Indentation = 4; writer.IndentChar = ' '; ds9.WriteXml(writer); writer.Flush(); writer.Close(); Response.End(); } catch { } } break; case "10": DataSet ds10 = null; try { string stype = "0"; if (Request["STYPE"] != null) { stype = Request["STYPE"]; ds10 = QuCheck.GetWLSXNEW(fname.Trim(), stype); } else { ds10 = QuCheck.GetWLSX(fname.Trim()); } } catch (Exception ex) { string a = ex.Message; Response.Write("ERROR"); } if (ds10 != null) { try { XmlTextWriter writer = new XmlTextWriter(Response.OutputStream, Response.ContentEncoding); writer.Formatting = Formatting.Indented; writer.Indentation = 4; writer.IndentChar = ' '; ds10.WriteXml(writer); writer.Flush(); writer.Close(); Response.End(); } catch { } } break; case "11": DataSet ds11 = null; try { ds11 = QuCheck.GetPHZXBZ(fname); } catch (Exception ex) { string a = ex.Message; Response.Write("ERROR"); } if (ds11 != null) { try { XmlTextWriter writer = new XmlTextWriter(Response.OutputStream, Response.ContentEncoding); writer.Formatting = Formatting.Indented; writer.Indentation = 4; writer.IndentChar = ' '; ds11.WriteXml(writer); writer.Flush(); writer.Close(); Response.End(); } catch { } } break; case "12": DataSet ds12 = null; try { ds12 = QuCheck.GetWGDItemZH(fname, Request["ph"]); } catch (Exception ex) { string a = ex.Message; Response.Write("ERROR"); } if (ds12 != null) { try { XmlTextWriter writer = new XmlTextWriter(Response.OutputStream, Response.ContentEncoding); writer.Formatting = Formatting.Indented; writer.Indentation = 4; writer.IndentChar = ' '; ds12.WriteXml(writer); writer.Flush(); writer.Close(); Response.End(); } catch { } } break; case "13": DataSet ds13 = null; try { ds13 = QuCheck.getWgdStatus(fname); } catch (Exception ex) { string a = ex.Message; Response.Write("ERROR"); } if (ds13 != null) { try { XmlTextWriter writer = new XmlTextWriter(Response.OutputStream, Response.ContentEncoding); writer.Formatting = Formatting.Indented; writer.Indentation = 4; writer.IndentChar = ' '; ds13.WriteXml(writer); writer.Flush(); writer.Close(); Response.End(); } catch { } } break; case "14": DataSet ds14 = null; try { ds14 = QuCheck.getwgdzjbxx(fname); } catch (Exception ex) { string a = ex.Message; Response.Write("ERROR"); } if (ds14 != null) { try { XmlTextWriter writer = new XmlTextWriter(Response.OutputStream, Response.ContentEncoding); writer.Formatting = Formatting.Indented; writer.Indentation = 4; writer.IndentChar = ' '; ds14.WriteXml(writer); writer.Flush(); writer.Close(); Response.End(); } catch { } } break; case "15": string res15 = ""; try { res15 = QuCheck.isgp(fname); Response.Write(res15); Response.End(); } catch { } break; case "16": DataSet ds16 = null; try { ds16 = QuCheck.getWgdSCZT(fname); } catch (Exception ex) { string a = ex.Message; Response.Write("ERROR"); } if (ds16 != null) { try { XmlTextWriter writer = new XmlTextWriter(Response.OutputStream, Response.ContentEncoding); writer.Formatting = Formatting.Indented; writer.Indentation = 4; writer.IndentChar = ' '; ds16.WriteXml(writer); writer.Flush(); writer.Close(); Response.End(); } catch { } } break; case "17": string res17 = null; try { // var url = "LogincAjax.aspx?TYPE=17&fname=" + strpch + "&pch=" + hpch.value + "&pclx=" + pclx + "&pcsx=" + encodeURI(pcsx) + "&zxbz=" + encodeURI(zxbz) + //"&isgp=" + isgp + "&zpdjbz=" + zpdj + "&itemwlh=" + wgditemwlh + "&itemph=" + encodeURI(wgditemph) + "&itemgg=" + encodeURI(wgditemgg) + "&itemzxbz=" //+ encodeURI(wgditemzxbz) + "&itemsx=" + encodeURI(wgditemsx) + "&userno=" + userno.valuesxqgz="+encodeURI(selsxqgz.value)+"&sxqgg="+encodeURI(selsxqgg.value)+ // "&wlhper=" + selsxqwlhper.value + "&selsxqvfree=" + encodeURI(selsxqvfree.value); ; res17 = QuCheck.CheckQu(Request["pch"], Request["pclx"], Request["pcsx"], Request["zxbz"], Request["isgp"], Request["zpdjbz"], Request["itemwlh"], Request["itemph"], Request["itemgg"], Request["itemzxbz"], Request["itemsx"], Request["userno"], Request["free1"], Request["free2"], Request["free3"], Request["sxqgz"], Request["wlhper"], Request["sxqgg"], Request["selsxqvfree"]); Response.Write(res17); Response.End(); } catch { } break; case "18": DataSet ds18 = null; try { ds18 = QuCheck.GetBhgReason(fname); } catch (Exception ex) { string a = ex.Message; Response.Write("ERROR"); } if (ds18 != null) { try { XmlTextWriter writer = new XmlTextWriter(Response.OutputStream, Response.ContentEncoding); writer.Formatting = Formatting.Indented; writer.Indentation = 4; writer.IndentChar = ' '; ds18.WriteXml(writer); writer.Flush(); writer.Close(); Response.End(); } catch { } } break; case "19": //var url = "LogincAjax.aspx?TYPE=19&fname=" + encodeURI(txtreason.value) + "&itype=0&reasontype=" + reasontype + // "&oldreason=" + document.getElementById("htxtreason").value; string res19 = ""; try { res19 = QuCheck.saveReason(Request["itype"], Request["reasontype"], Request["fname"], Request["oldreason"]); Response.Write(res19); Response.End(); } catch {} break; case "20": //"LogincAjax.aspx?TYPE=20&fname="+encodeURI(txtreason.value)+"&reasontype="+reasontype; string res20 = ""; try { res20 = QuCheck.delReason(Request["reasontype"], Request["fname"]); Response.Write(res20); Response.End(); } catch { } break; case "21": DataSet ds21 = null; try { ds21 = QuCheck.getPHZXBZ(); } catch (Exception ex) { string a = ex.Message; Response.Write("ERROR"); } if (ds21 != null) { try { XmlTextWriter writer = new XmlTextWriter(Response.OutputStream, Response.ContentEncoding); writer.Formatting = Formatting.Indented; writer.Indentation = 4; writer.IndentChar = ' '; ds21.WriteXml(writer); writer.Flush(); writer.Close(); Response.End(); } catch { } } break; case "22": //var url = "LogincAjax.aspx?TYPE=22&ph="+encodeURI(txtph.value)+"&opetype=0&zxbz="+encodeURI(txtzxbz.value)+ //"&oldph="+encodeURI(htxtph.value)+"&oldzxbz="+encodeURI(htxtzxbz.value); string res22 = null; try { res22 = QuCheck.savezxbz(Request["zxbz"], Request["ph"], Request["opetype"], Request["oldph"], Request["oldzxbz"]); Response.Write(res22); Response.End(); } catch { } break; case "23": //var url = "LogincAjax.aspx?TYPE=23&ph="+encodeURI(txtph.value)+"&zxbz="+encodeURI(txtzxbz.value); string res23 = null; try { res23 = QuCheck.delzxbz(Request["zxbz"], Request["ph"]); Response.Write(res23); Response.End(); } catch { } break; case "24": DataSet ds24 = null; try { ds24 = QuCheck.getseleds(Request["fname"], Request["tbname"]); } catch (Exception ex) { string aa = ex.Message; Response.Write("ERROR"); } if (ds24 != null) { try { XmlTextWriter writer = new XmlTextWriter(Response.OutputStream, Response.ContentEncoding); writer.Formatting = Formatting.Indented; writer.Indentation = 4; writer.IndentChar = ' '; ds24.WriteXml(writer); writer.Flush(); writer.Close(); Response.End(); } catch { } } break; case "25": string res25 = null; try { res25 = QuCheck.SetPcInfo(Request["itype"], Request["pch"], Request["barcode"], Request["selpcinfo"], Request["newpcinfo"], Request["sx"]); Response.Write(res25); Response.End(); } catch { } break; case "26": DataSet ds26 = null; try { ds26 = QuCheck.GetWGDItemsPH(Request["pch"]); } catch (Exception ex) { string aa = ex.Message; Response.Write("ERROR"); } if (ds26 != null) { try { XmlTextWriter writer = new XmlTextWriter(Response.OutputStream, Response.ContentEncoding); writer.Formatting = Formatting.Indented; writer.Indentation = 4; writer.IndentChar = ' '; ds26.WriteXml(writer); writer.Flush(); writer.Close(); Response.End(); } catch { } } break; case "27": try { string defaultitemstr = QuCheck.GetDefaultItem(Request["pch"], Request["ph"]); Response.Write(defaultitemstr); Response.End(); } catch { } break; case "28": try { string defaultSx = QuCheck.GetDefaultSx(Request["pch"]); Response.Write(defaultSx); Response.End(); } catch { } break; case "29": DataSet ds29 = null; try { ds29 = QuCheck.getWgdGZ(Request["wlhper"].ToString()); } catch (Exception ex) { string aa = ex.Message; Response.Write("ERROR"); Response.End(); } if (ds29 != null) { try { XmlTextWriter writer = new XmlTextWriter(Response.OutputStream, Response.ContentEncoding); writer.Formatting = Formatting.Indented; writer.Indentation = 4; writer.IndentChar = ' '; ds29.WriteXml(writer); writer.Flush(); writer.Close(); Response.End(); } catch { } } break; case "2901": //2901&wlhper="+selsxqwlhper.value+"&sxqgz="+selsxqgz.value; DataSet ds2901 = null; try { ds2901 = QuCheck.getWgdgg(Request["wlhper"].ToString(), Request["sxqgz"].ToString()); } catch (Exception ex) { string aa = ex.Message; Response.Write("ERROR"); Response.End(); } if (ds2901 != null) { try { XmlTextWriter writer = new XmlTextWriter(Response.OutputStream, Response.ContentEncoding); writer.Formatting = Formatting.Indented; writer.Indentation = 4; writer.IndentChar = ' '; ds2901.WriteXml(writer); writer.Flush(); writer.Close(); Response.End(); } catch { } } break; case "2902": DataSet ds2902 = null; try { ds2902 = QuCheck.getWgdvfree(Request["wlhper"].ToString(), Request["sxqgz"].ToString(), Request["sxqgg"].ToString()); } catch (Exception ex) { string aa = ex.Message; Response.Write("ERROR"); Response.End(); } if (ds2902 != null) { try { XmlTextWriter writer = new XmlTextWriter(Response.OutputStream, Response.ContentEncoding); writer.Formatting = Formatting.Indented; writer.Indentation = 4; writer.IndentChar = ' '; ds2902.WriteXml(writer); writer.Flush(); writer.Close(); Response.End(); } catch { } } break; case "30": DataSet ds30 = null; try { ds30 = QuCheck.getQPInfo(Request["wlhper"]); } catch (System.Exception ex) { Response.Write("ERROR:" + ex.Message); } if (ds30 != null) { try { XmlTextWriter writer = new XmlTextWriter(Response.OutputStream, Response.ContentEncoding); writer.Formatting = Formatting.Indented; writer.Indentation = 4; writer.IndentChar = ' '; ds30.WriteXml(writer); writer.Flush(); writer.Close(); Response.End(); } catch { } } break; case "301": DataSet ds301 = null; try { ds301 = QuCheck.getQPBzbz(Request["wlhstr"]); } catch (System.Exception ex) { Response.Write("ERROR:" + ex.Message); } if (ds301 != null) { try { XmlTextWriter writer = new XmlTextWriter(Response.OutputStream, Response.ContentEncoding); writer.Formatting = Formatting.Indented; writer.Indentation = 4; writer.IndentChar = ' '; ds301.WriteXml(writer); writer.Flush(); writer.Close(); Response.End(); } catch { } } break; case "302": string qpwlh = Request["wlh"].ToString(); string res302 = QuCheck.setall(qpwlh); Response.Write(res302); Response.End(); break; case "303": string qpwlh1 = Request["wlh"].ToString(); string qpbzbz = Request["bzbz"].ToString(); string qpope = Request["ope"].ToString(); string res303 = QuCheck.setbzbz(qpwlh1, qpbzbz, qpope); Response.Write(res303); Response.End(); break; case "31": string res31 = ""; try { //"../CheckQu/LogincAjax.aspx?TYPE=31&wlh="+encodeURI(txtwlh.value)+"&opetype=0&isqp="+ckqps; res31 = QuCheck.saveqp(Request["wlh"], Request["isqp"], Request["oldwlh"], Request["opetype"]); Response.Write(res31); Response.End(); } catch { } break; case "32": try { //"../CheckQu/LogincAjax.aspx?TYPE=31&wlh="+encodeURI(txtwlh.value)+"&opetype=0&isqp="+ckqps; res31 = QuCheck.delwlh(Request["wlh"]); Response.Write(res31); Response.End(); } catch { } break; case "33": DataSet ds33 = null; try { ds33 = QuCheck.getBZBZInfo(); } catch (System.Exception ex) { Response.Write("ERROR:" + ex.Message); } if (ds33 != null) { try { XmlTextWriter writer = new XmlTextWriter(Response.OutputStream, Response.ContentEncoding); writer.Formatting = Formatting.Indented; writer.Indentation = 4; writer.IndentChar = ' '; ds33.WriteXml(writer); writer.Flush(); writer.Close(); Response.End(); } catch { } } break; case "34": string res34 = ""; try { // "../CheckQu/LogincAjax.aspx?TYPE=34&txtbzbz=" + encodeURI(txtbzbz.value) + //"&opetype=0&bzxx=" + bzxx.value + "&bzsx=" + bzsx.value + "&clkz=" + clkz.value + "&bz=" + bz.value + "&fid=''"; res34 = QuCheck.savebzbz(Request["txtbzbz"], Request["bzxx"], Request["bzsx"], Request["clkz"], Request["bz"], Request["fid"], Request["opetype"], Request["scx"]); Response.Write(res34); Response.End(); } catch { } break; case "35": string res35 = ""; try { res31 = QuCheck.delbzbz(Request["fid"]); Response.Write(res35); Response.End(); } catch { } break; case "36": try { string res36 = ""; DataSet ds36 = null; ds36 = QuCheck.getwlh(); if (ds36 != null) { try { XmlTextWriter writer = new XmlTextWriter(Response.OutputStream, Response.ContentEncoding); writer.Formatting = Formatting.Indented; writer.Indentation = 4; writer.IndentChar = ' '; ds36.WriteXml(writer); writer.Flush(); writer.Close(); Response.End(); } catch { } } } catch (System.Exception ex) { } break; case "37": string res37 = QuCheck.setQp(Request["wlh"]); Response.Write(res37); Response.End(); break; case "38": string res38 = QuCheck.checkfydqr(Request["fydh"]); Response.Write(res38); Response.End(); break; case "39": string res39 = QuCheck.checkfydOutqr(Request["fydh"]); Response.Write(res39); Response.End(); break; case "401": DataSet ds401 = null; try { string wlh = Request["wlh"]; if (wlh == "A") { if (Session["wlhcx"] != null && Session["wlhnull"] == "0") { string wl = Session["wlhcx"].ToString(); ds401 = QuCheck.getKCTW(wl); } else { ds401 = QuCheck.getKCTW(); } Session["wlhnull"] = "1"; } else { //记录查询的wlh Session["wlhcx"] = wlh; Session["wlhnull"] = "0"; ds401 = QuCheck.getKCTW(wlh); } } catch (System.Exception ex) { Response.Write("ERROR:" + ex.Message); } if (ds401 != null) { try { XmlTextWriter writer = new XmlTextWriter(Response.OutputStream, Response.ContentEncoding); writer.Formatting = Formatting.Indented; writer.Indentation = 4; writer.IndentChar = ' '; ds401.WriteXml(writer); writer.Flush(); writer.Close(); Response.End(); } catch { } } break; case "402": string res402 = ""; try { string userID = ""; if (Session[Config.Curren_User] != null) { ACCTRUE.WMSBLL.Model.User user = (ACCTRUE.WMSBLL.Model.User)Session[Config.Curren_User]; if (user != null) { userID = user.UserID; } } res402 = QuCheck.saveKCTW(Request["opetype"], Request["wlh"], Request["ph"], Request["gg"], Request["pprice"], Request["fprice"], Request["twzl"], GetUserId()); Response.Write(res402); Response.End(); } catch { } break; case "403": string res403 = ""; try { res403 = QuCheck.delKCTW(Request["wlh"], GetUserId()); Response.Write(res403); Response.End(); } catch { } break; case "404": string res404 = ""; try { res404 = WlbaseInfo.GetPHGG(Request["wlh"]); //res404 = Request["wlh"]+"svr";// QuCheck.delKCTW(Request["wlh"]); Response.Write(res404); Response.End(); } catch { } break; case "405": string res405 = ""; try { res405 = QuCheck.setKCTWStatus(Request["wlh"], Request["inuse"], GetUserId()); //res404 = Request["wlh"]+"svr";// QuCheck.delKCTW(Request["wlh"]); Response.Write(res405); Response.End(); } catch { } break; case "406": string res406 = ""; try { res406 = QuCheck.setKCTWStatus(Request["inuse"], GetUserId()); Response.Write(res406); Response.End(); } catch { } break; } } }