public static DataRow GetShedCurrCoffBalance(GINModel parentGin) { List <StackTransactionModel> StackByShedList; StackByShedList = new List <StackTransactionModel>(); DataRow dt = ECX.DataAccess.SQLHelper.getDataRow( ConnectionString, "GetCurCoffBalance", parentGin.PickupNoticesList[0].WarehouseReceiptNo, parentGin.LICShedID ); return(dt); }
public static DataRow GetShedCurrentBalance(GINModel parentGin) { List <StackTransactionModel> StackByShedList; StackByShedList = new List <StackTransactionModel>(); DataRow dt = ECX.DataAccess.SQLHelper.getDataRow( ConnectionString, "GetShedCurrentBalance", parentGin.LICShedID, parentGin.CommodityGradeID, parentGin.ProductionYear ); return(dt); }
public static List <StackTransactionModel> GetTruckType(GINModel parentGin) { List <StackTransactionModel> ServiceProviderList; ServiceProviderList = new List <StackTransactionModel>(); DataTable WarehouseOperator = ECX.DataAccess.SQLHelper.getDataTable(ConnectionString, "GetTruckType"); foreach (DataRow r in WarehouseOperator.Rows) { StackTransactionModel pnm = new StackTransactionModel(parentGin); Common.DataRow2Object(r, pnm); ServiceProviderList.Add(pnm); } return(ServiceProviderList); }
public static List <WarehouseOperator> LICs(GINModel currentGIN) { List <WarehouseOperator> licList; licList = new List <WarehouseOperator>(); DataTable WarehouseOperator = ECX.DataAccess.SQLHelper.getDataTable(ConnectionString, "GetLICs", currentGIN.WarehouseID, currentGIN.CommodityGradeID, currentGIN.PickupNoticesList[0].ProductionYear); foreach (DataRow r in WarehouseOperator.Rows) { WarehouseOperator pnm = new WarehouseOperator(); Common.DataRow2Object(r, pnm); licList.Add(pnm); } return(licList); }
public static List <GINModel> getUnApprovedPSA(string clientIdNo, int whrNo, Guid?licID, string PSANo, Guid warehouseId) { DataTable dt = SQLHelper.getDataTable(ConnectionString, "getUnApprovedPSA", clientIdNo, PSANo, whrNo, licID, warehouseId); List <GINModel> gmList = new List <GINModel>(); foreach (DataRow dr in dt.Rows) { GINModel gm = new GINModel(); Common.DataRow2Object(dr, gm); PickupNoticeModel pnm = new PickupNoticeModel(); Common.DataRow2Object(dr, pnm); gm.punList.Add(pnm); gmList.Add(gm); } return(gmList); }
//-------- Update END ------- NOV 27 2013 public static List <GINModel> SearchGIN(string clientIdNo, int whrNo, string status, string GINNo, Guid warehouseId) { DataTable dt = SQLHelper.getDataTable(ConnectionString, "GINSearch", clientIdNo, GINNo, whrNo, status, warehouseId); List <GINModel> gmList = new List <GINModel>(); foreach (DataRow dr in dt.Rows) { GINModel gm = new GINModel(); Common.DataRow2Object(dr, gm); PickupNoticeModel pnm = new PickupNoticeModel(); Common.DataRow2Object(dr, pnm); gm.punList.Add(pnm); gmList.Add(gm); } return(gmList); }
public static List <StackTransactionModel> GetCurCoffBalance(GINModel parentGin) { List <StackTransactionModel> StackByShedList; StackByShedList = new List <StackTransactionModel>(); DataTable dt = ECX.DataAccess.SQLHelper.getDataTable( ConnectionString, "GetCurCoffBalance", parentGin.PickupNoticesList[0].WarehouseReceiptNo, parentGin.LICShedID ); foreach (DataRow r in dt.Rows) { StackTransactionModel pnm = new StackTransactionModel(parentGin); Common.DataRow2Object(r, pnm); StackByShedList.Add(pnm); } return(StackByShedList); }
public static List <StackTransactionModel> GetStackInShed(GINModel parentGin) { List <StackTransactionModel> StackByShedList; StackByShedList = new List <StackTransactionModel>(); DataTable dt = ECX.DataAccess.SQLHelper.getDataTable( ConnectionString, "GetStackByShedId", parentGin.LICShedID, parentGin.CommodityGradeID, parentGin.ProductionYear ); foreach (DataRow r in dt.Rows) { StackTransactionModel pnm = new StackTransactionModel(parentGin); Common.DataRow2Object(r, pnm); StackByShedList.Add(pnm); } return(StackByShedList); }
//-------- Create END ------- March 20 2015 public static GINModel GetGIN(string GINNo) { GINModel gm = new GINModel(); DataTable dt = SQLHelper.getDataTable(ConnectionString, "GINGet", GINNo); Common.DataRow2Object(dt.Rows[0], gm); List <Guid> pnIdList = new List <Guid>(); List <Guid> sIdList = new List <Guid>(); foreach (DataRow dr in dt.Rows) { Guid pnID = new Guid(dr["PUNID"].ToString()); if (!pnIdList.Exists(s => s == pnID)) { pnIdList.Add(pnID); PickupNoticeModel pnm = new PickupNoticeModel(); Common.DataRow2Object(dr, pnm); pnm.ID = pnID; gm.punList.Add(pnm); } } foreach (DataRow dr in dt.Rows) { StackTransactionModel sm = new StackTransactionModel(gm); Common.DataRow2Object(dr, sm); if (sm.StackTransactionID == Guid.Empty) { break; } if (!sIdList.Exists(s => s == sm.StackTransactionID)) { sIdList.Add(sm.StackTransactionID); sm.ID = sm.StackTransactionID; gm.stackList.Add(sm); } } return(gm); }
public StackTransactionModel(GINModel parentGin) { ParentGIN = parentGin; GINID = ParentGIN.ID; }