public vmLSCurrentStock GetCurrentStock(vmSLCmnParameters objcmnParam) { GenericFactory_vmLSCurrentStock = new VmSLCurrentStock_VM(); vmLSCurrentStock CurrentStock = null; string spQuery = string.Empty; try { using (_ctxCmn = new ERP_Entities()) { Hashtable ht = new Hashtable(); ht.Add("CompanyID", objcmnParam.CompanyID); ht.Add("ItemID", objcmnParam.ItemID); ht.Add("DepartmentID", objcmnParam.DepartmentID); ht.Add("SupplierID", objcmnParam.SupplierID); ht.Add("BatchID", objcmnParam.BatchID); ht.Add("GradeID", objcmnParam.GradeID); ht.Add("LotID", objcmnParam.LotID); spQuery = "[Get_LSCurrentStock]"; CurrentStock = GenericFactory_vmLSCurrentStock.ExecuteQuerySingle(spQuery, ht); } } catch (Exception e) { e.ToString(); } return(CurrentStock); }
public vmSelectedItemDataSetSetup GetSelectedItemData(vmCmnParameters objcmnParam) { GFactory_vmSelectedItemDataSetSetup_GF = new vmSelectedItemDataSetSetup_GF(); vmSelectedItemDataSetSetup objItemDataById = null; string spQuery = string.Empty; try { using (_ctxCmn = new ERP_Entities()) { Hashtable ht = new Hashtable(); ht.Add("CompanyID", objcmnParam.loggedCompany); ht.Add("LoggedUser", objcmnParam.loggeduser); ht.Add("PIID", objcmnParam.ItemType); ht.Add("ItemID", objcmnParam.id); spQuery = "[Get_PSSSelectedItemData]"; objItemDataById = GFactory_vmSelectedItemDataSetSetup_GF.ExecuteQuerySingle(spQuery, ht); } } catch (Exception e) { e.ToString(); } return(objItemDataById); }
/// <summary> /// Single USer From Database /// <para>Use it when delete data through a stored procedure</para> /// </summary> public vmUser GetUserByID(int?id, int?CompanyID, int?LoggedUser) { vmUser objUser = null; try { if ((id > 0) && (CompanyID > 0)) { using (GenericFactoryFor_User = new vmUser_GF()) { Hashtable ht = new Hashtable(); ht.Add("CompanyID", CompanyID); ht.Add("LoggedUser", LoggedUser); ht.Add("UserID", id); string spQuery = "[Get_CmnUserByID]"; objUser = GenericFactoryFor_User.ExecuteQuerySingle(spQuery, ht); } } } catch (Exception e) { e.ToString(); } return(objUser); }
//public IEnumerable<vmChemicalSetupMasterDetail> GetSizingChemicalConsumptionDetailByID(vmCmnParameters objcmnParam) //{ // GFactory_vmChemicalSetupMasterDetail_GF = new vmChemicalSetupMasterDetail_GF(); // IEnumerable<vmChemicalSetupMasterDetail> objChemicalDetailByID = null; // string spQuery = string.Empty; // try // { // using (_ctxCmn = new ERP_Entities()) // { // Hashtable ht = new Hashtable(); // ht.Add("CompanyID", objcmnParam.loggedCompany); // ht.Add("LoggedUser", objcmnParam.loggeduser); // ht.Add("PageNo", objcmnParam.pageNumber); // ht.Add("RowCountPerPage", objcmnParam.pageSize); // ht.Add("IsPaging", objcmnParam.IsPaging); // ht.Add("SetID", objcmnParam.ItemType); // ht.Add("ChemicalConsumptionID", objcmnParam.id); // spQuery = "[Get_SizingChemicalConsumptionDetailByID]"; // objChemicalDetailByID = GFactory_vmChemicalSetupMasterDetail_GF.ExecuteQuery(spQuery, ht); // } // } // catch (Exception e) // { // e.ToString(); // } // return objChemicalDetailByID; //} public vmBallInfo GetCurrentStock(vmCmnParameters objcmnParam) { GenericFactory_vmBallInfo_GF = new vmBallInfo_GF(); vmBallInfo CurrentStockByFilter = null; string spQuery = string.Empty; try { using (_ctxCmn = new ERP_Entities()) { Hashtable ht = new Hashtable(); ht.Add("CompanyID", objcmnParam.loggedCompany); ht.Add("LoggedUser", objcmnParam.loggeduser); ht.Add("ItemID", objcmnParam.id); ht.Add("SupplierID", objcmnParam.ItemType); ht.Add("BatchID", objcmnParam.ItemGroup); ht.Add("DepartmentID", objcmnParam.DepartmentID); ht.Add("UnitID", objcmnParam.UserType); spQuery = "[Get_SizingChemConsumpCurrentStock]"; CurrentStockByFilter = GenericFactory_vmBallInfo_GF.ExecuteQuerySingle(spQuery, ht); } } catch (Exception e) { e.ToString(); } return(CurrentStockByFilter); }
/// <summary> /// Get Data From Database /// <para>Use it when to retive single data through a stored procedure</para> /// </summary> public vmCmnMenu GetMenuByID(int?id) { GenericFactoryFor_Menu = new vmCmnMenu_GF(); vmCmnMenu objMenu = new vmCmnMenu(); string spQuery = string.Empty; try { Hashtable ht = new Hashtable(); ht.Add("MenuID", id); spQuery = "[Get_CmnMenuSingle]"; objMenu = GenericFactoryFor_Menu.ExecuteQuerySingle(spQuery, ht); } catch (Exception e) { e.ToString(); } return(objMenu); }
/// <summary> /// Get Data From Database /// <para>Use it when to retive single data through a stored procedure</para> /// </summary> public EmpMaster GetEmployeeByID(int?id) { EmpMaster objEmployee = null; string spQuery = string.Empty; try { Hashtable ht = new Hashtable(); ht.Add("EmpMasterID", id); spQuery = "[Get_EmployeeSingle]"; objEmployee = GenericFactoryFor_Emp.ExecuteQuerySingle(spQuery, ht); } catch (Exception e) { e.ToString(); } return(objEmployee); }
/// <summary> /// Get Data From Database /// <para>Use it when to retive single data through a stored procedure</para> /// </summary> public vmCmnOrganogram GetOrganogramByID(int?id) { GenericFactoryFor_Organogram = new vmCmnOrganogram_GF(); vmCmnOrganogram objOrganogram = null; string spQuery = string.Empty; try { Hashtable ht = new Hashtable(); ht.Add("OrganogramID", id); spQuery = "[Get_CmnOrganogramSingle]"; objOrganogram = GenericFactoryFor_Organogram.ExecuteQuerySingle(spQuery, ht); } catch (Exception e) { e.ToString(); } return(objOrganogram); }
/// <summary> /// Get Data From Database /// <para>Use it when to retive single data through a stored procedure</para> /// </summary> public tbl_Customer GetCustomerByID(int?id) { tbl_Customer objCustomer = null; string spQuery = string.Empty; try { Hashtable ht = new Hashtable(); ht.Add("CustomerID", id); spQuery = "[Get_CustomersSingle]"; objCustomer = GenericFactoryFor_Customer.ExecuteQuerySingle(spQuery, ht); } catch (Exception e) { e.ToString(); } return(objCustomer); }
/// <summary> /// Get Data From Database /// <para>Use it when to retive single data through a stored procedure</para> /// </summary> public vmCmnModule GetModuleByID(int?id) { GenericFactoryFor_Module = new vmCmnModule_GF(); vmCmnModule objModule = null; string spQuery = string.Empty; try { Hashtable ht = new Hashtable(); ht.Add("ModuleID", id); spQuery = "[Get_CmnModuleSingle]"; objModule = GenericFactoryFor_Module.ExecuteQuerySingle(spQuery, ht); } catch (Exception e) { e.ToString(); } return(objModule); }
/// <summary> /// Get Data From Database /// <para>Use it when to retive single data through a stored procedure</para> /// </summary> public CmnCompany GetCompanyByID(int?id) { GenericFactoryFor_Company = new CmnCompany_GF(); CmnCompany objCompany = null; string spQuery = string.Empty; try { Hashtable ht = new Hashtable(); ht.Add("CompanyID", id); spQuery = "[Get_CmnCompanySingle]"; objCompany = GenericFactoryFor_Company.ExecuteQuerySingle(spQuery, ht); } catch (Exception ex) { ErrorLog.Log(ex); ex.ToString(); } return(objCompany); }
public vmPrdFinishingMRRMasterShrinkage GetWeavingSetInformation(vmCmnParameters objcmnParam) { GenericFactory_vmPrdFinishingMRRMasterShrinkage_GF = new vmPrdFinishingMRRMasterShrinkage_VM(); vmPrdFinishingMRRMasterShrinkage objSetInformation = null; string spQuery = string.Empty; try { Hashtable ht = new Hashtable(); ht.Add("CompanyID", objcmnParam.loggedCompany); ht.Add("WeavingMRRID", objcmnParam.id); //ht.Add("FinishingMRRID", objcmnParam.ItemType); //FinishingMRRID is applicable when retrieve sizemrrmaster data spQuery = "[Get_WeavingSetInformation]"; objSetInformation = GenericFactory_vmPrdFinishingMRRMasterShrinkage_GF.ExecuteQuerySingle(spQuery, ht); } catch (Exception e) { e.ToString(); } return(objSetInformation); }
public vmSetSetupMasterDetail GetSetMasterByID(vmCmnParameters objcmnParam) { GFactory_VM_PrdSetSetupMasterDetail = new PrdSetSetupMasterDetail_VM(); vmSetSetupMasterDetail objSingleSetMaster = null; string spQuery = string.Empty; try { using (_ctxCmn = new ERP_Entities()) { Hashtable ht = new Hashtable(); ht.Add("SetMasterID", objcmnParam.id); spQuery = "[Get_SetMasterByID]"; objSingleSetMaster = GFactory_VM_PrdSetSetupMasterDetail.ExecuteQuerySingle(spQuery, ht); } } catch (Exception e) { e.ToString(); } return(objSingleSetMaster); }