private IList <ProductMasterModel> fnProductMaster_List(ProductMasterModel apiObject, ref string strResult) { string strReturnCode = "000"; string strReturnMsg = "UnDefined"; string crCnString = UtilityLib.GetConnectionString(); IList <ProductMasterModel> objFieldClassModelList = new List <ProductMasterModel>(); DataSet usersInfoDS = DL_ProductMaster.Product_List(crCnString, apiObject.RequestType, apiObject.SearchBy, apiObject.SearchString, apiObject.Productid, apiObject.CompanyId, apiObject.ItemsPerPage, apiObject.RequestPageNo, apiObject.CurrentPageNo); DataTable usersInfoDT = usersInfoDS.Tables[0]; if (usersInfoDT != null && usersInfoDT.Rows.Count > 0) { strReturnCode = "001"; strReturnMsg = "Success"; foreach (DataRow dr in usersInfoDT.Rows) { apiObject = new ProductMasterModel(); apiObject.Productid = UtilityLib.FormatNumber(dr["Processid"].ToString()); apiObject.ProductName = (string)dr["ProductName"]; apiObject.UOM = UtilityLib.FormatNumber(dr["UOM"].ToString()); //apiObject.State = UtilityLib.FormatString(dr["State"]); //apiObject.Texture = UtilityLib.FormatNumber(dr["Texture "].ToString()); //apiObject.Catagory = UtilityLib.FormatNumber(dr["Catagory "].ToString()); apiObject.CreatedBy = (Guid)(dr["CreatedBy"]); apiObject.CreatedDate = UtilityLib.FormatDate(dr["CreatedDate"]); apiObject.IsDelete = UtilityLib.FormatBoolean(dr["IsDelete"].ToString()); apiObject.SafeLifeInGodown = UtilityLib.FormatDate(dr["SafeLifeInGodown"]); apiObject.ProcessId = (string)(dr["ProcessId"]); apiObject.BuyProductId = UtilityLib.FormatNumber(dr["BuyProductId"].ToString()); apiObject.BuyProductPacking = UtilityLib.FormatNumber(dr["BuyProductPacking"].ToString()); apiObject.CompanyId = (Guid)(dr["CompanyId"]); objFieldClassModelList.Add(apiObject); } } else { strReturnCode = "002"; strReturnMsg = "Fail-Record Not Found"; } strResult = strReturnCode + "|" + strReturnMsg; return(objFieldClassModelList); }
private IList <InventoryModel> fnInventory_List(InventoryModel apiObject, ref string strResult) { string strReturnCode = "000"; string strReturnMsg = "UnDefined"; string crCnString = UtilityLib.GetConnectionString(); IList <InventoryModel> objFieldClassModelList = new List <InventoryModel>(); DataSet usersInfoDS = DAL_Inventory.Inventory_List(crCnString, apiObject.RequestType, apiObject.SearchBy, apiObject.SearchString, apiObject.ReciptNo, apiObject.ComapnyId, apiObject.ItemsPerPage, apiObject.RequestPageNo, apiObject.CurrentPageNo); DataTable usersInfoDT = usersInfoDS.Tables[0]; if (usersInfoDT != null && usersInfoDT.Rows.Count > 0) { strReturnCode = "001"; strReturnMsg = "Success"; foreach (DataRow dr in usersInfoDT.Rows) { apiObject = new InventoryModel(); apiObject.ReciptNo = UtilityLib.FormatNumber(dr["ReciptNo"].ToString()); apiObject.FarmerId = UtilityLib.FormatNumber(dr["FarmerId"].ToString()); apiObject.LoginId = UtilityLib.FormatNumber(dr["LoginId"].ToString()); apiObject.PersonName = (string)dr["PersonName"]; apiObject.Quantity = UtilityLib.FormatNumber(dr["Qunatity"].ToString()); apiObject.Unit = (string)dr["Unit"]; apiObject.RawMaterial = (string)dr["RawMaterial"]; apiObject.Storage = UtilityLib.FormatNumber(dr["Storage"].ToString()); apiObject.CreatedDate = UtilityLib.FormatDate(dr["CreatedDate"]); //apiObject.CompanyId = (Guid)(dr["CompanyId"]); objFieldClassModelList.Add(apiObject); } } else { strReturnCode = "002"; strReturnMsg = "Fail-Record Not Found"; } strResult = strReturnCode + "|" + strReturnMsg; return(objFieldClassModelList); }
private IList <ProcessMasterModel> fnProcessMaster_List(ProcessMasterModel apiObject, ref string strResult) { string strReturnCode = "000"; string strReturnMsg = "UnDefined"; string crCnString = UtilityLib.GetConnectionString(); IList <ProcessMasterModel> objFieldClassModelList = new List <ProcessMasterModel>(); DataSet usersInfoDS = DL_ProcessMaster.Process_List(crCnString, apiObject.RequestType, apiObject.SearchBy, apiObject.SearchString, apiObject.ProcessId, apiObject.CompanyId, apiObject.ItemsPerPage, apiObject.RequestPageNo, apiObject.CurrentPageNo); DataTable usersInfoDT = usersInfoDS.Tables[0]; if (usersInfoDT != null && usersInfoDT.Rows.Count > 0) { strReturnCode = "001"; strReturnMsg = "Success"; foreach (DataRow dr in usersInfoDT.Rows) { apiObject = new ProcessMasterModel(); apiObject.ProcessId = UtilityLib.FormatNumber(dr["ProcessId"].ToString()); apiObject.ProcessName = (string)dr["ProcessName"]; apiObject.QuantityFlag = UtilityLib.FormatBoolean(dr["QuantityFlag"].ToString()); apiObject.ByProduct = UtilityLib.FormatBoolean(dr["ByProduct"].ToString()); apiObject.WastageFlag = UtilityLib.FormatBoolean(dr["WastageFlag"].ToString()); apiObject.QuantityFlag = UtilityLib.FormatBoolean(dr["QuantityFlag"].ToString()); apiObject.IsDelete = UtilityLib.FormatBoolean(dr["IsDelete"].ToString()); apiObject.ProcessDuration = UtilityLib.FormatDate(dr["ProcessDuration"]).ToString(); apiObject.ProcessVolume = UtilityLib.FormatFloat(dr["ProcessVolume"]); //apiObject.CompanyId = (Guid)(dr["CompanyId"]); objFieldClassModelList.Add(apiObject); } } else { strReturnCode = "002"; strReturnMsg = "Fail-Record Not Found"; } strResult = strReturnCode + "|" + strReturnMsg; return(objFieldClassModelList); }