//查询无PO快速入库数据 public bool GetFastInNotHavePOInfo(Task_Model taskmo, ref DividPage dividpage, ref List <Task_Model> lsttask, ref string strErrMsg) { if (dividpage == null) { dividpage = new DividPage(); } lsttask = new List <Task_Model>(); try { using (SqlDataReader dr = Common_DB.QueryByDividPage(ref dividpage, GetSql(taskmo), GetFilterSql(taskmo))) { Console.Write(GetSql(taskmo) + "\n" + GetFilterSql(taskmo)); while (dr.Read()) { lsttask.Add(GetModelFromDataReader(dr)); } dividpage.CurrentPageRecordCounts = lsttask.Count; } if (lsttask == null || lsttask.Count == 0) { strErrMsg = "没有快速入库单信息!"; return(false); } else { return(true); } } catch (Exception ex) { strErrMsg = ex.Message; return(false); } }
public bool GetWarehouseListByPage(ref List <WarehouseInfo> modelList, WarehouseInfo model, ref DividPage page, UserInfo user, ref string strError) { if (page == null) { page = new DividPage(); } List <WarehouseInfo> lstModel = new List <WarehouseInfo>(); try { using (SqlDataReader dr = Common_DB.QueryByDividPage(ref page, "V_Warehouse", GetFilterSql(model, user), "*", "Order By WarehouseNo,ID Desc")) { while (dr.Read()) { lstModel.Add(GetModelFromDataReader(dr)); } } modelList = lstModel; return(true); } catch (Exception ex) { strError = ex.Message; return(false); } }
public bool GetCheckDetailsListByPage(ref List <CheckDetailsInfo> modelList, CheckDetailsInfo model, ref DividPage page, UserInfo user, ref string strError) { if (page == null) { page = new DividPage(); } List <CheckDetailsInfo> lstModel = new List <CheckDetailsInfo>(); try { using (SqlDataReader dr = Common_DB.QueryByDividPage(ref page, "V_CheckDetails", GetFilterSql(model, user), GetFieldsSql(model, user), "Order By CheckID Desc,ID Desc")) { while (dr.Read()) { lstModel.Add(GetModelFromDataReader(dr)); } } modelList = lstModel; return(true); } catch (Exception ex) { strError = ex.Message; return(false); } finally { } }
public bool GetCheckAnalyseListByPage(ref List <CheckDetailsInfo> modelList, CheckDetailsInfo model, ref DividPage page, UserInfo user, ref string strError) { if (!_db.UpdateCheckAnalyse(model, ref strError)) { return(false); } List <CheckDetailsInfo> lstModel = new List <CheckDetailsInfo>(); try { using (SqlDataReader dr = Common_DB.QueryByDividPage(ref page, "V_CheckAnalyse", GetFilterSql(model, user), "*", "Order by OperationTime desc")) { while (dr.Read()) { lstModel.Add(GetModelFromDataReader(dr)); } } modelList = lstModel; return(true); } catch (Exception ex) { strError = ex.Message; return(false); } finally { } }
public bool GetStockDetailListByPage(ref List <Stock_Model> modelList, Stock_Model model, ref DividPage page, UserInfo user, ref string strError) { if (page == null) { page = new DividPage(); } List <Stock_Model> lstModel = new List <Stock_Model>(); try { using (SqlDataReader dr = Common_DB.QueryByDividPage(ref page, "V_StockDetail", GetFilterSql(model, user), "*", "Order By CreateTime desc,WarehouseNo,HouseNo,AreaNo,MaterialNo,Qty")) { while (dr.Read()) { lstModel.Add(GetModelFromDataReader(dr)); } } modelList = lstModel; return(true); } catch (Exception ex) { strError = ex.Message; return(false); } finally { } }
public bool GetSpecialReturnMaterialListByPage(ref List <SpecialReturnMaterial> modelList, SpecialReturnMaterial model, ref DividPage page, UserInfo user, ref string strError) { if (page == null) { page = new DividPage(); } List <SpecialReturnMaterial> lstModel = new List <SpecialReturnMaterial>(); try { using (SqlDataReader dr = Common_DB.QueryByDividPage(ref page, "V_SpecialReturnMaterial", GetFilterSql(model, user), "*", "Order By InvtID,ID Desc")) { while (dr.Read()) { lstModel.Add(GetModelFromDataReader(dr)); } } modelList = lstModel; return(true); } catch (Exception ex) { strError = ex.Message; return(false); } finally { } }
public bool GetCheckDetailsSelectListByPage(ref List <CheckDetailsInfo> modelList, CheckDetailsInfo model, ref DividPage page, UserInfo user, ref string strError) { List <CheckDetailsInfo> lstModel = new List <CheckDetailsInfo>(); try { string ViewName = string.Empty; string FiltSql = string.Empty; string SortSql = string.Empty; if (!GetSelectListFilterSql(model, user, ref ViewName, ref FiltSql, ref SortSql)) { strError = "获取盘点选择视图错误"; return(false); } using (SqlDataReader dr = Common_DB.QueryByDividPage(ref page, ViewName, FiltSql, "V.*", SortSql)) { while (dr.Read()) { lstModel.Add(GetModelFromDataReader(dr)); } } modelList = lstModel; return(true); } catch (Exception ex) { strError = ex.Message; return(false); } finally { } }
public bool GetPrintRecordListByPage(ref List <Barcode_Model> modelList, Barcode_Model model, ref DividPage page, UserInfo user, ref string strError) { if (page == null) { page = new DividPage(); } List <Barcode_Model> lstModel = new List <Barcode_Model>(); try { using (SqlDataReader dr = Common_DB.QueryByDividPage(ref page, "v_printrecord", GetFilterSql(model, user), "barcodetype, strbarcodetype, supcode, supname, vouchertype, strvouchertype, sum(printqty) printqty", "Order by SupCode, BarcodeType, VoucherType, sum(PrintQty) desc")) { while (dr.Read()) { lstModel.Add(GetModelFromDataReader(dr)); } } modelList = lstModel; return(true); } catch (Exception ex) { strError = ex.Message; return(false); } finally { } }
public bool GetOverViewDetailByPage(ref List <OverViewDetailInfo> modelList, OverViewDetailInfo model, ref DividPage page, UserInfo user, ref string strError) { if (page == null) { page = new DividPage(); } List <OverViewDetailInfo> lstModel = new List <OverViewDetailInfo>(); try { using (SqlDataReader dr = Common_DB.QueryByDividPage(ref page, "V_OverViewDetail", GetFilterSql(model, user))) { while (dr.Read()) { lstModel.Add(GetModelFromDataReader(dr)); } } modelList = lstModel; return(true); } catch (Exception ex) { strError = ex.Message; return(false); } finally { } }
public bool GetTaskTransListByPage(ref List <TaskTransInfo> modelList, TaskTransInfo model, ref DividPage page, UserInfo user, ref string strError) { if (page == null) { page = new DividPage(); } List <TaskTransInfo> lstModel = new List <TaskTransInfo>(); try { using (SqlDataReader dr = Common_DB.QueryByDividPage(ref page, "V_TaskTrans", GetFilterSql(model, user), "*", "Order By CreateDate desc,TaskNo,FromAreaNo,ToAreaNo,SerialNo")) { while (dr.Read()) { lstModel.Add(GetModelFromDataReader(dr)); } } modelList = lstModel; return(true); } catch (Exception ex) { strError = ex.Message; return(false); } finally { } }
/// <summary> /// 获取检验通知书导出数据 /// </summary> /// <param name="strErrMsg"></param> /// <returns></returns> public bool GetQualityExportListByPage(ref List <QuanlityExportInfo> modelList, QuanlityExportInfo model, ref DividPage page, UserInfo user, ref string strError) { if (page == null) { page = new DividPage(); } List <QuanlityExportInfo> lstModel = new List <QuanlityExportInfo>(); try { using (SqlDataReader dr = Common_DB.QueryByDividPage(ref page, "V_GetQualityExportInfo", GetFilterSql(model, user), "*", "Order By CreateDate Desc")) { while (dr.Read()) { lstModel.Add(GetQualityExport_ModelFromDataReader(dr)); } } modelList = lstModel; return(true); } catch (Exception ex) { strError = ex.Message; return(false); } finally { } }
public bool GetProfitLossListByPage(ref List <ProfitLossInfo> modelList, ProfitLossInfo model, ref DividPage page, UserInfo user, ref string strError) { List <ProfitLossInfo> lstModel = new List <ProfitLossInfo>(); try { using (SqlDataReader dr = Common_DB.QueryByDividPage(ref page, "V_ProfitLoss", GetFilterSql(model, user), "*", "Order By CheckID Desc, AreaNo, MaterialNo, AccountQty Desc, ScanQty Desc")) { while (dr.Read()) { lstModel.Add(GetModelFromDataReader(dr)); } } modelList = lstModel; return(true); } catch (Exception ex) { strError = ex.Message; return(false); } finally { } }
public bool QueryFastInList(Task_Model taskModel, string BeginTime, string EndTime, ref DividPage dividpage, ref List <Task_Model> lsttask, ref string strErrMsg) { if (dividpage == null) { dividpage = new DividPage(); } lsttask = new List <Task_Model>(); try { using (SqlDataReader dr = Common_DB.QueryByDividPage(ref dividpage, "v_queryfastinlist", GetFilterSql(taskModel, BeginTime, EndTime), "*", "Order by CREATEDATETIME desc")) { while (dr.Read()) { lsttask.Add(GetModelFromDataReader(dr)); } dividpage.CurrentPageRecordCounts = lsttask.Count; } if (lsttask == null || lsttask.Count == 0) { strErrMsg = "没有快速入库单信息!"; return(false); } else { return(true); } } catch (Exception ex) { strErrMsg = ex.Message; return(false); } }
public bool GetQualityDetailListByPage(ref List <DeliveryReceiveDetail_Model> modelList, DeliveryReceiveDetail_Model model, ref DividPage page, UserInfo user, ref string strError) { if (page == null) { page = new DividPage(); } List <DeliveryReceiveDetail_Model> lstModel = new List <DeliveryReceiveDetail_Model>(); try { using (SqlDataReader dr = Common_DB.QueryByDividPage(ref page, "V_GETQUALITYDETAILINFO", GetFilterSql(model, user), "*", "Order By rowno Asc")) { while (dr.Read()) { lstModel.Add(GetDeliveryReceiveDetail_ModelFromDataReader(dr)); } } modelList = lstModel; return(true); } catch (Exception ex) { strError = ex.Message; return(false); } finally { } }