|  |  | 
 |  |  | using System.Collections.Generic; | 
 |  |  | using System.Data; | 
 |  |  | using System.Web.Http; | 
 |  |  | using ViewAPI; | 
 |  |  | using WebAPI.Models; | 
 |  |  | namespace WebAPI.Controllers | 
 |  |  | { | 
 |  |  | 
 |  |  |                 } | 
 |  |  |  | 
 |  |  |                 ds = Sc_MouldMaintainBillList_s(sWhere); | 
 |  |  |                 if (ds == null || ds.Tables[0].Rows.Count <= 0) | 
 |  |  |                 { | 
 |  |  |                     objJsonResult.code = "0"; | 
 |  |  |                     objJsonResult.count = 0; | 
 |  |  |                     objJsonResult.Message = "没有返回任何记录!"; | 
 |  |  |                     objJsonResult.data = null; | 
 |  |  |                     return objJsonResult; | 
 |  |  |                 } | 
 |  |  |                 else | 
 |  |  |                 { | 
 |  |  |                     objJsonResult.code = "1"; | 
 |  |  |                     objJsonResult.count = 1; | 
 |  |  |                     objJsonResult.Message = "返回记录成功!"; | 
 |  |  |                     objJsonResult.data = ds.Tables[0]; | 
 |  |  |                     return objJsonResult; | 
 |  |  |                 } | 
 |  |  |  | 
 |  |  |                 //if (ds.Tables[0].Rows.Count != 0 || ds != null) | 
 |  |  |                 //{ | 
 |  |  |                 objJsonResult.code = "1"; | 
 |  |  |                 objJsonResult.count = 1; | 
 |  |  |                 objJsonResult.Message = "Sucess!"; | 
 |  |  |                 objJsonResult.data = ds.Tables[0]; | 
 |  |  |                 return objJsonResult; | 
 |  |  |                 //} | 
 |  |  |                 //else | 
 |  |  |                 //{ | 
 |  |  |                 //objJsonResult.code = "0"; | 
 |  |  |                 //objJsonResult.count = 0; | 
 |  |  |                 //objJsonResult.Message = "无数据"; | 
 |  |  |                 //objJsonResult.data = null; | 
 |  |  |                 //return objJsonResult; | 
 |  |  |                 //} | 
 |  |  |             } | 
 |  |  |             catch (Exception ex) | 
 |  |  |             { | 
 |  |  | 
 |  |  |         { | 
 |  |  |             if (sWhere == null || sWhere.Equals("")) | 
 |  |  |             { | 
 |  |  |                 return new SQLHelper.ClsCN().RunProcReturn("select *  from h_v_Sc_MouldMaintain order by 日期 desc", "h_v_Sc_MouldMaintain"); | 
 |  |  |                 return new SQLHelper.ClsCN().RunProcReturn("select *  from h_v_Sc_MouldMaintain order by hmainid desc", "h_v_Sc_MouldMaintain"); | 
 |  |  |             } | 
 |  |  |             else | 
 |  |  |             { | 
 |  |  |                 string sql1 = "select * from h_v_Sc_MouldMaintain where 1 = 1 "; | 
 |  |  |                 string sql = sql1 + sWhere + "order by 日期 desc"; | 
 |  |  |                 string sql = sql1 + sWhere + "order by hmainid desc"; | 
 |  |  |                 return new SQLHelper.ClsCN().RunProcReturn(sql, "h_v_Sc_MouldMaintain"); | 
 |  |  |  | 
 |  |  |             } | 
 |  |  | 
 |  |  |                 } | 
 |  |  |  | 
 |  |  |                 ds = Sc_MouldDotCheckPlanBillList_s(sWhere); | 
 |  |  |                 if (ds == null || ds.Tables[0].Rows.Count <= 0) | 
 |  |  |                 { | 
 |  |  |                     objJsonResult.code = "0"; | 
 |  |  |                     objJsonResult.count = 0; | 
 |  |  |                     objJsonResult.Message = "没有返回任何记录!"; | 
 |  |  |                     objJsonResult.data = null; | 
 |  |  |                     return objJsonResult; | 
 |  |  |                 } | 
 |  |  |                 else | 
 |  |  |                 { | 
 |  |  |                     objJsonResult.code = "1"; | 
 |  |  |                     objJsonResult.count = 1; | 
 |  |  |                     objJsonResult.Message = "返回记录成功!"; | 
 |  |  |                     objJsonResult.data = ds.Tables[0]; | 
 |  |  |                     return objJsonResult; | 
 |  |  |                 } | 
 |  |  |  | 
 |  |  |                 //if (ds.Tables[0].Rows.Count != 0 || ds != null) | 
 |  |  |                 //{ | 
 |  |  |                 objJsonResult.code = "1"; | 
 |  |  |                 objJsonResult.count = 1; | 
 |  |  |                 objJsonResult.Message = "Sucess!"; | 
 |  |  |                 objJsonResult.data = ds.Tables[0]; | 
 |  |  |                 return objJsonResult; | 
 |  |  |                 //} | 
 |  |  |                 //else | 
 |  |  |                 //{ | 
 |  |  |                 //objJsonResult.code = "0"; | 
 |  |  |                 //objJsonResult.count = 0; | 
 |  |  |                 //objJsonResult.Message = "无数据"; | 
 |  |  |                 //objJsonResult.data = null; | 
 |  |  |                 //return objJsonResult; | 
 |  |  |                 //} | 
 |  |  |             } | 
 |  |  |             catch (Exception ex) | 
 |  |  |             { | 
 |  |  | 
 |  |  |  | 
 |  |  |         public static DataSet Sc_MouldDotCheckPlanBillList_s(string sWhere) | 
 |  |  |         { | 
 |  |  |             return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_Sc_MouldDotCheckPlanBillList order by 日期 desc", "h_v_Sc_MouldDotCheckPlanBillList"); | 
 |  |  |             return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_Sc_MouldDotCheckPlanBillList where 1=1 "+sWhere+ " order by hmainid desc", "h_v_Sc_MouldDotCheckPlanBillList"); | 
 |  |  |         } | 
 |  |  |         #endregion | 
 |  |  |  | 
 |  |  | 
 |  |  |                     return objJsonResult; | 
 |  |  |                 } | 
 |  |  |                 ds = Sc_MouldDotCheckBillList_s(sWhere); | 
 |  |  |                 if (ds == null || ds.Tables[0].Rows.Count <= 0) | 
 |  |  |                 { | 
 |  |  |                     objJsonResult.code = "0"; | 
 |  |  |                     objJsonResult.count = 0; | 
 |  |  |                     objJsonResult.Message = "没有返回任何记录!"; | 
 |  |  |                     objJsonResult.data = null; | 
 |  |  |                     return objJsonResult; | 
 |  |  |                 } | 
 |  |  |                 else | 
 |  |  |                 { | 
 |  |  |                     objJsonResult.code = "1"; | 
 |  |  |                     objJsonResult.count = 1; | 
 |  |  |                     objJsonResult.Message = "返回记录成功!"; | 
 |  |  |                     objJsonResult.data = ds.Tables[0]; | 
 |  |  |                     return objJsonResult; | 
 |  |  |                 } | 
 |  |  |  | 
 |  |  |                 //if (ds.Tables[0].Rows.Count != 0 || ds != null) | 
 |  |  |                 //{ | 
 |  |  |                 objJsonResult.code = "1"; | 
 |  |  |                 objJsonResult.count = 1; | 
 |  |  |                 objJsonResult.Message = "Sucess!"; | 
 |  |  |                 objJsonResult.data = ds.Tables[0]; | 
 |  |  |                 return objJsonResult; | 
 |  |  |                 //} | 
 |  |  |                 //else | 
 |  |  |                 //{ | 
 |  |  |                 //objJsonResult.code = "0"; | 
 |  |  |                 //objJsonResult.count = 0; | 
 |  |  |                 //objJsonResult.Message = "无数据"; | 
 |  |  |                 //objJsonResult.data = null; | 
 |  |  |                 //return objJsonResult; | 
 |  |  |                 //} | 
 |  |  |             } | 
 |  |  |             catch (Exception ex) | 
 |  |  |             { | 
 |  |  | 
 |  |  |  | 
 |  |  |         public static DataSet Sc_MouldDotCheckBillList_s(string sWhere) | 
 |  |  |         { | 
 |  |  |             return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_Sc_MouldDotCheckBillList where 1=1 " + sWhere + "order by 日期 desc", "h_v_Sc_MouldDotCheckBillList"); | 
 |  |  |             return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_Sc_MouldDotCheckBillList where 1=1 " + sWhere + "order by hmainid desc", "h_v_Sc_MouldDotCheckBillList"); | 
 |  |  |         } | 
 |  |  |         #endregion | 
 |  |  |  | 
 |  |  | 
 |  |  |                 } | 
 |  |  |  | 
 |  |  |                 ds = Sc_MouldMaintainPlanBillList_s(sWhere); | 
 |  |  |                 if (ds == null || ds.Tables[0].Rows.Count <= 0) | 
 |  |  |                 { | 
 |  |  |                     objJsonResult.code = "0"; | 
 |  |  |                     objJsonResult.count = 0; | 
 |  |  |                     objJsonResult.Message = "没有返回任何记录!"; | 
 |  |  |                     objJsonResult.data = null; | 
 |  |  |                     return objJsonResult; | 
 |  |  |                 } | 
 |  |  |                 else | 
 |  |  |                 { | 
 |  |  |                     objJsonResult.code = "1"; | 
 |  |  |                     objJsonResult.count = 1; | 
 |  |  |                     objJsonResult.Message = "返回记录成功!"; | 
 |  |  |                     objJsonResult.data = ds.Tables[0]; | 
 |  |  |                     return objJsonResult; | 
 |  |  |                 } | 
 |  |  |  | 
 |  |  |                 //if (ds.Tables[0].Rows.Count != 0 || ds != null) | 
 |  |  |                 //{ | 
 |  |  |                 objJsonResult.code = "1"; | 
 |  |  |                 objJsonResult.count = 1; | 
 |  |  |                 objJsonResult.Message = "Sucess!"; | 
 |  |  |                 objJsonResult.data = ds.Tables[0]; | 
 |  |  |                 return objJsonResult; | 
 |  |  |                 //} | 
 |  |  |                 //else | 
 |  |  |                 //{ | 
 |  |  |                 //objJsonResult.code = "0"; | 
 |  |  |                 //objJsonResult.count = 0; | 
 |  |  |                 //objJsonResult.Message = "无数据"; | 
 |  |  |                 //objJsonResult.data = null; | 
 |  |  |                 //return objJsonResult; | 
 |  |  |                 //} | 
 |  |  |             } | 
 |  |  |             catch (Exception ex) | 
 |  |  |             { | 
 |  |  | 
 |  |  |  | 
 |  |  |         public static DataSet Sc_MouldMaintainPlanBillList_s(string sWhere) | 
 |  |  |         { | 
 |  |  |             return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_Sc_MouldMaintainPlanBillList where 1=1 "+sWhere+" order by 日期 desc", "h_v_Sc_MouldMaintainPlanBillList"); | 
 |  |  |             return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_Sc_MouldMaintainPlanBillList where 1=1 "+sWhere+ " order by hmainid desc", "h_v_Sc_MouldMaintainPlanBillList"); | 
 |  |  |         } | 
 |  |  |         #endregion | 
 |  |  |  | 
 |  |  | 
 |  |  |                 } | 
 |  |  |  | 
 |  |  |                 ds = Sc_MouldConkBookBillList_s(sWhere); | 
 |  |  |  | 
 |  |  |                 objJsonResult.code = "1"; | 
 |  |  |                 objJsonResult.count = 1; | 
 |  |  |                 objJsonResult.Message = "Sucess!"; | 
 |  |  | 
 |  |  |             DataSet ds; | 
 |  |  |             if (sWhere == null || sWhere.Equals("")) | 
 |  |  |             { | 
 |  |  |                 ds = new SQLHelper.ClsCN().RunProcReturn("select * from h_v_Sc_MouldConkBookBillList order by 日期 desc" + sWhere, "h_v_Sc_MouldConkBookBillList"); | 
 |  |  |                 ds = new SQLHelper.ClsCN().RunProcReturn("select * from h_v_Sc_MouldConkBookBillList where 1=1 " + sWhere+ " order by hmainid desc", "h_v_Sc_MouldConkBookBillList"); | 
 |  |  |             } | 
 |  |  |             else | 
 |  |  |             { | 
 |  |  | 
 |  |  |                 } | 
 |  |  |  | 
 |  |  |                 ds = Sc_MouldRepairCheckBillList_s(sWhere); | 
 |  |  |  | 
 |  |  |                 objJsonResult.code = "1"; | 
 |  |  |                 objJsonResult.count = 1; | 
 |  |  |                 objJsonResult.Message = "返回记录成功!"; | 
 |  |  | 
 |  |  |             DataSet ds; | 
 |  |  |             if (sWhere == null || sWhere.Equals("")) | 
 |  |  |             { | 
 |  |  |                 ds = new SQLHelper.ClsCN().RunProcReturn("select * from h_v_Sc_MouldRepairCheckBillList_Edit order by 日期 desc" + sWhere, "h_v_Sc_MouldRepairCheckBillList_Edit"); | 
 |  |  |                 ds = new SQLHelper.ClsCN().RunProcReturn("select * from h_v_Sc_MouldRepairCheckBillList_Edit where 1=1" + sWhere+ " order by hmainid desc", "h_v_Sc_MouldRepairCheckBillList_Edit"); | 
 |  |  |             } | 
 |  |  |             else | 
 |  |  |             { | 
 |  |  |                 string sql1 = "select * from h_v_Sc_MouldRepairCheckBillList_Edit where 1 = 1 "; | 
 |  |  |                 string sql = sql1 + sWhere + "order by 日期 desc"; | 
 |  |  |                 string sql = sql1 + sWhere + "order by hmainid desc"; | 
 |  |  |                 ds = new SQLHelper.ClsCN().RunProcReturn(sql, "h_v_Sc_MouldRepairCheckBillList_Edit"); | 
 |  |  |             } | 
 |  |  |             return ds; | 
 |  |  | 
 |  |  |                 } | 
 |  |  |  | 
 |  |  |                 ds = Sc_MouldRepairWorkBillList_s(sWhere); | 
 |  |  |                 if (ds == null || ds.Tables[0].Rows.Count <= 0) | 
 |  |  |                 { | 
 |  |  |                     objJsonResult.code = "0"; | 
 |  |  |                     objJsonResult.count = 0; | 
 |  |  |                     objJsonResult.Message = "没有返回任何记录!"; | 
 |  |  |                     objJsonResult.data = null; | 
 |  |  |                     return objJsonResult; | 
 |  |  |                 } | 
 |  |  |                 else | 
 |  |  |                 { | 
 |  |  |                     objJsonResult.code = "1"; | 
 |  |  |                     objJsonResult.count = 1; | 
 |  |  |                     objJsonResult.Message = "返回记录成功!"; | 
 |  |  |                     objJsonResult.data = ds.Tables[0]; | 
 |  |  |                     return objJsonResult; | 
 |  |  |                 } | 
 |  |  |  | 
 |  |  |                 //if (ds.Tables[0].Rows.Count != 0 || ds != null) | 
 |  |  |                 //{ | 
 |  |  |                 objJsonResult.code = "1"; | 
 |  |  |                 objJsonResult.count = 1; | 
 |  |  |                 objJsonResult.Message = "Sucess!"; | 
 |  |  |                 objJsonResult.data = ds.Tables[0]; | 
 |  |  |                 return objJsonResult; | 
 |  |  |                 //} | 
 |  |  |                 //else | 
 |  |  |                 //{ | 
 |  |  |                 //objJsonResult.code = "0"; | 
 |  |  |                 //objJsonResult.count = 0; | 
 |  |  |                 //objJsonResult.Message = "无数据"; | 
 |  |  |                 //objJsonResult.data = null; | 
 |  |  |                 //return objJsonResult; | 
 |  |  |                 //} | 
 |  |  |             } | 
 |  |  |             catch (Exception ex) | 
 |  |  |             { | 
 |  |  | 
 |  |  |         { | 
 |  |  |             if (sWhere == null || sWhere.Equals("")) | 
 |  |  |             { | 
 |  |  |                 return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_Sc_MouldRepairWorkBillList order by 日期 desc" + sWhere, "h_v_Sc_MouldRepairWorkBillList"); | 
 |  |  |                 return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_Sc_MouldRepairWorkBillList where 1=1 " + sWhere+ " order by hmainid desc", "h_v_Sc_MouldRepairWorkBillList"); | 
 |  |  |             } | 
 |  |  |             else | 
 |  |  |             { | 
 |  |  |                 string sql1 = "select * from h_v_Sc_MouldRepairWorkBillList where 1 = 1 "; | 
 |  |  |                 string sql = sql1 + sWhere + "order by 日期 desc"; | 
 |  |  |                 string sql = sql1 + sWhere + "order by hmainid desc"; | 
 |  |  |                 return new SQLHelper.ClsCN().RunProcReturn(sql, "h_v_Sc_MouldRepairWorkBillList"); | 
 |  |  |             } | 
 |  |  |         } | 
 |  |  | 
 |  |  |  | 
 |  |  |                 if (sWhere == null || sWhere.Equals("")) | 
 |  |  |                 { | 
 |  |  |                     ds = oCN.RunProcReturn("select * from h_v_IF_MoveStockBillList order by 日期 desc", "h_v_IF_MoveStockBillList"); | 
 |  |  |                     ds = oCN.RunProcReturn("select * from h_v_IF_MoveStockBillList order by hmainid desc", "h_v_IF_MoveStockBillList"); | 
 |  |  |                 } | 
 |  |  |                 else | 
 |  |  |                 { | 
 |  |  |                     string sql = "select * from h_v_IF_MoveStockBillList where 1=1 " + sWhere+ "order by 日期 desc"; | 
 |  |  |                     string sql = "select * from h_v_IF_MoveStockBillList where 1=1 " + sWhere+ "order by hmainid desc"; | 
 |  |  |                     ds = oCN.RunProcReturn(sql, "h_v_IF_MoveStockBillList"); | 
 |  |  |                 } | 
 |  |  |                 if (ds == null || ds.Tables[0].Rows.Count <= 0) | 
 |  |  |                 { | 
 |  |  |                     objJsonResult.code = "0"; | 
 |  |  |                     objJsonResult.count = 0; | 
 |  |  |                     objJsonResult.Message = "没有返回任何记录!"; | 
 |  |  |                     objJsonResult.data = null; | 
 |  |  |                     return objJsonResult; | 
 |  |  |                 } | 
 |  |  |                 else | 
 |  |  |                 { | 
 |  |  |                     objJsonResult.code = "1"; | 
 |  |  |                     objJsonResult.count = 1; | 
 |  |  |                     objJsonResult.Message = "返回记录成功!"; | 
 |  |  |                     objJsonResult.data = ds.Tables[0]; | 
 |  |  |                     return objJsonResult; | 
 |  |  |                 } | 
 |  |  |  | 
 |  |  |                 //if (ds.Tables[0].Rows.Count != 0 || ds != null) | 
 |  |  |                 //{ | 
 |  |  |                 objJsonResult.code = "1"; | 
 |  |  |                 objJsonResult.count = 1; | 
 |  |  |                 objJsonResult.Message = "Sucess!"; | 
 |  |  |                 objJsonResult.data = ds.Tables[0]; | 
 |  |  |                 return objJsonResult; | 
 |  |  |                 //} | 
 |  |  |                 //else | 
 |  |  |                 //{ | 
 |  |  |                 //objJsonResult.code = "0"; | 
 |  |  |                 //objJsonResult.count = 0; | 
 |  |  |                 //objJsonResult.Message = "无数据"; | 
 |  |  |                 //objJsonResult.data = null; | 
 |  |  |                 //return objJsonResult; | 
 |  |  |                 //} | 
 |  |  |             } | 
 |  |  |             catch (Exception ex) | 
 |  |  |             { | 
 |  |  | 
 |  |  |                 } | 
 |  |  |  | 
 |  |  |                 ds = Sc_GetSellOutBillList(sWhere); | 
 |  |  |                 if (ds == null || ds.Tables[0].Rows.Count <= 0) | 
 |  |  |                 { | 
 |  |  |                     objJsonResult.code = "0"; | 
 |  |  |                     objJsonResult.count = 0; | 
 |  |  |                     objJsonResult.Message = "没有返回任何记录!"; | 
 |  |  |                     objJsonResult.data = null; | 
 |  |  |                     return objJsonResult; | 
 |  |  |                 } | 
 |  |  |                 else | 
 |  |  |                 { | 
 |  |  |                     objJsonResult.code = "1"; | 
 |  |  |                     objJsonResult.count = 1; | 
 |  |  |                     objJsonResult.Message = "返回记录成功!"; | 
 |  |  |                     objJsonResult.data = ds.Tables[0]; | 
 |  |  |                     return objJsonResult; | 
 |  |  |                 } | 
 |  |  |  | 
 |  |  |                 //if (ds.Tables[0].Rows.Count != 0 || ds != null) | 
 |  |  |                 //{ | 
 |  |  |                 objJsonResult.code = "1"; | 
 |  |  |                 objJsonResult.count = 1; | 
 |  |  |                 objJsonResult.Message = "Sucess!"; | 
 |  |  |                 objJsonResult.data = ds.Tables[0]; | 
 |  |  |                 return objJsonResult; | 
 |  |  |                 //} | 
 |  |  |                 //else | 
 |  |  |                 //{ | 
 |  |  |                 //objJsonResult.code = "0"; | 
 |  |  |                 //objJsonResult.count = 0; | 
 |  |  |                 //objJsonResult.Message = "无数据"; | 
 |  |  |                 //objJsonResult.data = null; | 
 |  |  |                 //return objJsonResult; | 
 |  |  |                 //} | 
 |  |  |             } | 
 |  |  |             catch (Exception ex) | 
 |  |  |             { | 
 |  |  | 
 |  |  |                     ds = oCN.RunProcReturn(sql, "h_v_Kf_OtherOutBillList"); | 
 |  |  |                 } | 
 |  |  |  | 
 |  |  |                 if (ds == null || ds.Tables[0].Rows.Count <= 0) | 
 |  |  |                 { | 
 |  |  |                     objJsonResult.code = "0"; | 
 |  |  |                     objJsonResult.count = 0; | 
 |  |  |                     objJsonResult.Message = "没有返回任何记录!"; | 
 |  |  |                     objJsonResult.data = null; | 
 |  |  |                     return objJsonResult; | 
 |  |  |                 } | 
 |  |  |                 else | 
 |  |  |                 { | 
 |  |  |                     objJsonResult.code = "1"; | 
 |  |  |                     objJsonResult.count = 1; | 
 |  |  |                     objJsonResult.Message = "返回记录成功!"; | 
 |  |  |                     objJsonResult.data = ds.Tables[0]; | 
 |  |  |                     return objJsonResult; | 
 |  |  |                 } | 
 |  |  |                 //if (ds.Tables[0].Rows.Count != 0 || ds != null) | 
 |  |  |                 //{ | 
 |  |  |                 objJsonResult.code = "1"; | 
 |  |  |                 objJsonResult.count = 1; | 
 |  |  |                 objJsonResult.Message = "Sucess!"; | 
 |  |  |                 objJsonResult.data = ds.Tables[0]; | 
 |  |  |                 return objJsonResult; | 
 |  |  |                 //} | 
 |  |  |                 //else | 
 |  |  |                 //{ | 
 |  |  |                 //objJsonResult.code = "0"; | 
 |  |  |                 //objJsonResult.count = 0; | 
 |  |  |                 //objJsonResult.Message = "无数据"; | 
 |  |  |                 //objJsonResult.data = null; | 
 |  |  |                 //return objJsonResult; | 
 |  |  |                 //} | 
 |  |  |             } | 
 |  |  |             catch (Exception ex) | 
 |  |  |             { | 
 |  |  | 
 |  |  |                     string sql = "select * from h_v_IF_ProductInBillList where 1 = 1 " + sWhere + " order by hmainid desc"; | 
 |  |  |                     ds = oCN.RunProcReturn(sql, "h_v_IF_ProductInBillList"); | 
 |  |  |                 } | 
 |  |  |                 if (ds == null || ds.Tables[0].Rows.Count <= 0) | 
 |  |  |                 { | 
 |  |  |                     objJsonResult.code = "0"; | 
 |  |  |                     objJsonResult.count = 0; | 
 |  |  |                     objJsonResult.Message = "没有返回任何记录!"; | 
 |  |  |                     objJsonResult.data = null; | 
 |  |  |                     return objJsonResult; | 
 |  |  |                 } | 
 |  |  |                 else | 
 |  |  |                 { | 
 |  |  |                     objJsonResult.code = "1"; | 
 |  |  |                     objJsonResult.count = 1; | 
 |  |  |                     objJsonResult.Message = "返回记录成功!"; | 
 |  |  |                     objJsonResult.data = ds.Tables[0]; | 
 |  |  |                     return objJsonResult; | 
 |  |  |                 } | 
 |  |  |  | 
 |  |  |                 //if (ds.Tables[0].Rows.Count != 0 || ds != null) | 
 |  |  |                 //{ | 
 |  |  |                 objJsonResult.code = "1"; | 
 |  |  |                 objJsonResult.count = 1; | 
 |  |  |                 objJsonResult.Message = "Sucess!"; | 
 |  |  |                 objJsonResult.data = ds.Tables[0]; | 
 |  |  |                 return objJsonResult; | 
 |  |  |                 //} | 
 |  |  |                 //else | 
 |  |  |                 //{ | 
 |  |  |                 //objJsonResult.code = "0"; | 
 |  |  |                 //objJsonResult.count = 0; | 
 |  |  |                 //objJsonResult.Message = "无数据"; | 
 |  |  |                 //objJsonResult.data = null; | 
 |  |  |                 //return objJsonResult; | 
 |  |  |                 //} | 
 |  |  |             } | 
 |  |  |             catch (Exception ex) | 
 |  |  |             { | 
 |  |  | 
 |  |  |                     string sql = "select * from h_v_Kf_OtherInBillList where 1 = 1 " + sWhere+ " order by hmainid desc"; | 
 |  |  |                     ds = oCN.RunProcReturn(sql, "h_v_Kf_OtherInBillList"); | 
 |  |  |                 } | 
 |  |  |                 if (ds == null || ds.Tables[0].Rows.Count <= 0) | 
 |  |  |                 { | 
 |  |  |                     objJsonResult.code = "0"; | 
 |  |  |                     objJsonResult.count = 0; | 
 |  |  |                     objJsonResult.Message = "没有返回任何记录!"; | 
 |  |  |                     objJsonResult.data = null; | 
 |  |  |                     return objJsonResult; | 
 |  |  |                 } | 
 |  |  |                 else | 
 |  |  |                 { | 
 |  |  |                     objJsonResult.code = "1"; | 
 |  |  |                     objJsonResult.count = 1; | 
 |  |  |                     objJsonResult.Message = "返回记录成功!"; | 
 |  |  |                     objJsonResult.data = ds.Tables[0]; | 
 |  |  |                     return objJsonResult; | 
 |  |  |                 } | 
 |  |  |  | 
 |  |  |                 //if (ds.Tables[0].Rows.Count != 0 || ds != null) | 
 |  |  |                 //{ | 
 |  |  |                 objJsonResult.code = "1"; | 
 |  |  |                 objJsonResult.count = 1; | 
 |  |  |                 objJsonResult.Message = "Sucess!"; | 
 |  |  |                 objJsonResult.data = ds.Tables[0]; | 
 |  |  |                 return objJsonResult; | 
 |  |  |                 //} | 
 |  |  |                 //else | 
 |  |  |                 //{ | 
 |  |  |                 //objJsonResult.code = "0"; | 
 |  |  |                 //objJsonResult.count = 0; | 
 |  |  |                 //objJsonResult.Message = "无数据"; | 
 |  |  |                 //objJsonResult.data = null; | 
 |  |  |                 //return objJsonResult; | 
 |  |  |                 //} | 
 |  |  |             } | 
 |  |  |             catch (Exception ex) | 
 |  |  |             { | 
 |  |  | 
 |  |  |                     string sql = "select * from h_v_Kf_EntrustInBillList where 1 = 1 " + sWhere+ " order by hmainid desc"; | 
 |  |  |                     ds = oCN.RunProcReturn(sql, "h_v_Kf_EntrustInBillList"); | 
 |  |  |                 } | 
 |  |  |                 if (ds == null || ds.Tables[0].Rows.Count <= 0) | 
 |  |  |                 { | 
 |  |  |                     objJsonResult.code = "0"; | 
 |  |  |                     objJsonResult.count = 0; | 
 |  |  |                     objJsonResult.Message = "没有返回任何记录!"; | 
 |  |  |                     objJsonResult.data = null; | 
 |  |  |                     return objJsonResult; | 
 |  |  |                 } | 
 |  |  |                 else | 
 |  |  |                 { | 
 |  |  |                     objJsonResult.code = "1"; | 
 |  |  |                     objJsonResult.count = 1; | 
 |  |  |                     objJsonResult.Message = "返回记录成功!"; | 
 |  |  |                     objJsonResult.data = ds.Tables[0]; | 
 |  |  |                     return objJsonResult; | 
 |  |  |                 } | 
 |  |  |  | 
 |  |  |                 //if (ds.Tables[0].Rows.Count != 0 || ds != null) | 
 |  |  |                 //{ | 
 |  |  |                 objJsonResult.code = "1"; | 
 |  |  |                 objJsonResult.count = 1; | 
 |  |  |                 objJsonResult.Message = "Sucess!"; | 
 |  |  |                 objJsonResult.data = ds.Tables[0]; | 
 |  |  |                 return objJsonResult; | 
 |  |  |                 //} | 
 |  |  |                 //else | 
 |  |  |                 //{ | 
 |  |  |                 //objJsonResult.code = "0"; | 
 |  |  |                 //objJsonResult.count = 0; | 
 |  |  |                 //objJsonResult.Message = "无数据"; | 
 |  |  |                 //objJsonResult.data = null; | 
 |  |  |                 //return objJsonResult; | 
 |  |  |                 //} | 
 |  |  |             } | 
 |  |  |             catch (Exception ex) | 
 |  |  |             { | 
 |  |  | 
 |  |  |                 } | 
 |  |  |  | 
 |  |  |                 ds = Sc_GetMouldScrapOutHouseBill(sWhere, Organization); | 
 |  |  |  | 
 |  |  |                 objJsonResult.code = "1"; | 
 |  |  |                 objJsonResult.count = 1; | 
 |  |  |                 objJsonResult.Message = "返回记录成功!"; | 
 |  |  | 
 |  |  |             string sql1 = string.Format(@"select * from h_v_Sc_MouldScrapOutHouseBillList where 库存组织='" + Organization + "'"); | 
 |  |  |             if (sWhere == null || sWhere.Equals("")) | 
 |  |  |             { | 
 |  |  |                 return new SQLHelper.ClsCN().RunProcReturn(sql1 + "order by 制单日期 desc", "h_v_Sc_MouldScrapOutHouseBillList"); | 
 |  |  |                 return new SQLHelper.ClsCN().RunProcReturn(sql1 + "order by hmainid desc", "h_v_Sc_MouldScrapOutHouseBillList"); | 
 |  |  |             } | 
 |  |  |             else | 
 |  |  |             { | 
 |  |  |                 string sql = sql1 + sWhere + "order by 制单日期 desc"; | 
 |  |  |                 string sql = sql1 + sWhere + "order by hmainid desc"; | 
 |  |  |                 return new SQLHelper.ClsCN().RunProcReturn(sql, "h_v_Sc_MouldScrapOutHouseBillList"); | 
 |  |  |             } | 
 |  |  |         } | 
 |  |  | 
 |  |  |                 } | 
 |  |  |  | 
 |  |  |                 ds = Sc_GetMouldProdBackBill(sWhere, Organization); | 
 |  |  |  | 
 |  |  |                 objJsonResult.code = "1"; | 
 |  |  |                 objJsonResult.count = 1; | 
 |  |  |                 objJsonResult.Message = "返回记录成功!"; | 
 |  |  | 
 |  |  |             string sql1 = string.Format(@"select * from h_v_Sc_MouldProdBackBillList where 库存组织='" + Organization + "'"); | 
 |  |  |             if (sWhere == null || sWhere.Equals("")) | 
 |  |  |             { | 
 |  |  |                 return new SQLHelper.ClsCN().RunProcReturn(sql1 + "order by 制单日期 desc", "h_v_Sc_MouldProdBackBillList"); | 
 |  |  |                 return new SQLHelper.ClsCN().RunProcReturn(sql1 + "order by hmainid desc", "h_v_Sc_MouldProdBackBillList"); | 
 |  |  |             } | 
 |  |  |             else | 
 |  |  |             { | 
 |  |  |                 string sql = sql1 + sWhere + "order by 制单日期 desc"; | 
 |  |  |                 string sql = sql1 + sWhere + "order by hmainid desc"; | 
 |  |  |                 return new SQLHelper.ClsCN().RunProcReturn(sql, "h_v_Sc_MouldProdBackBillList"); | 
 |  |  |             } | 
 |  |  |  | 
 |  |  | 
 |  |  |                 } | 
 |  |  |  | 
 |  |  |                 ds = Sc_GetMouldProdOutBill(sWhere, Organization); | 
 |  |  |  | 
 |  |  |                 objJsonResult.code = "1"; | 
 |  |  |                 objJsonResult.count = 1; | 
 |  |  |                 objJsonResult.Message = "返回记录成功!"; | 
 |  |  | 
 |  |  |             string sql1 = string.Format(@"select * from h_v_Sc_MouldProdOutHouseBillList where 库存组织='" + Organization + "'"); | 
 |  |  |             if (sWhere == null || sWhere.Equals("")) | 
 |  |  |             { | 
 |  |  |                 return new SQLHelper.ClsCN().RunProcReturn(sql1 + "order by 制单日期 desc", "h_v_Sc_MouldProdOutHouseBillList"); | 
 |  |  |                 Log.LogInfo(sql1); | 
 |  |  |                 return new SQLHelper.ClsCN().RunProcReturn(sql1 + "order by hmainid desc", "h_v_Sc_MouldProdOutHouseBillList"); | 
 |  |  |             } | 
 |  |  |             else | 
 |  |  |             { | 
 |  |  |                 string sql = sql1 + sWhere + "order by 制单日期 desc"; | 
 |  |  |                 string sql = sql1 + sWhere + "order by hmainid desc"; | 
 |  |  |                 return new SQLHelper.ClsCN().RunProcReturn(sql, "h_v_Sc_MouldProdOutHouseBillList"); | 
 |  |  |             } | 
 |  |  |  | 
 |  |  | 
 |  |  |                 } | 
 |  |  |  | 
 |  |  |                 ds = Sc_GetMouldLifeChangeBill(sWhere); | 
 |  |  |  | 
 |  |  |                 objJsonResult.code = "1"; | 
 |  |  |                 objJsonResult.count = 1; | 
 |  |  |                 objJsonResult.Message = "返回记录成功!"; | 
 |  |  | 
 |  |  |         { | 
 |  |  |             if (sWhere == null || sWhere.Equals("")) | 
 |  |  |             { | 
 |  |  |                 return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_Sc_MouldLifeChangeBillList order by 日期 desc", "h_v_Sc_MouldLifeChangeBillList"); | 
 |  |  |                 return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_Sc_MouldLifeChangeBillList order by hmainid desc", "h_v_Sc_MouldLifeChangeBillList"); | 
 |  |  |             } | 
 |  |  |             else | 
 |  |  |             { | 
 |  |  |                 string sql1 = "select * from h_v_Sc_MouldLifeChangeBillList where 1 = 1 "; | 
 |  |  |                 string sql = sql1 + sWhere + "order by 日期 desc"; | 
 |  |  |                 string sql = sql1 + sWhere + "order by hmainid desc"; | 
 |  |  |                 return new SQLHelper.ClsCN().RunProcReturn(sql, "h_v_Sc_MouldLifeChangeBillList"); | 
 |  |  |             } | 
 |  |  |  |