Пример #1
0
        public List <vmFinishGood> GetAllRowMaterial(vmCmnParameters objcmnParam, out int recordsTotal)
        {
            GenericFactoryFor_FabricDevelopment = new FabricDevelopment_EF();
            List <vmFinishGood> _objvmItemGroup = null;
            string spQuery = string.Empty;

            recordsTotal = 0;
            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("ItemTypeID", objcmnParam.ItemType);

                    spQuery         = "[SPGetItemDetail]";
                    _objvmItemGroup = GenericFactoryFor_FabricDevelopment.ExecuteQuery(spQuery, ht).ToList();

                    recordsTotal = _ctxCmn.CmnItemMasters.Where(x => x.ItemTypeID == objcmnParam.ItemType).Count();
                }
            }
            catch (Exception e)
            {
                e.ToString();
            }

            return(_objvmItemGroup);
        }
Пример #2
0
        public IEnumerable <vmChallan> GetItmDetailByItmCode(vmCmnParameters objcmnParam, string ItemCode)
        {
            GenericFactory_GF_vmChallan = new vmChallan_GF();
            string spQuery = "";
            IEnumerable <vmChallan> lstItemDetailByItmCode = null;

            // recordsTotal = 0;
            try
            {
                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("ArticleNo", ItemCode);

                spQuery = "[Get_InvChallanItemByItemCode]";

                lstItemDetailByItmCode = GenericFactory_GF_vmChallan.ExecuteQuery(spQuery, ht);

                // recordsTotal = lstMasterInfoByGrrNo.Count();
            }
            catch (Exception e)
            {
                e.ToString();
            }
            return(lstItemDetailByItmCode);
        }
Пример #3
0
        public IEnumerable <vmChallan> GetPOMasterList(vmCmnParameters objcmnParam, out int recordsTotal)
        {
            GenericFactory_GF_vmChallan = new vmChallan_GF();
            string spQuery = "";
            IEnumerable <vmChallan> lstPOMaster = null;

            recordsTotal = 0;
            try
            {
                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);

                spQuery = "[Get_PurPOList]";

                lstPOMaster = GenericFactory_GF_vmChallan.ExecuteQuery(spQuery, ht);

                // recordsTotal = lstPOMaster.Count();
                recordsTotal = (int)lstPOMaster.FirstOrDefault().RecordTotal;
            }
            catch (Exception e)
            {
                e.ToString();
            }
            return(lstPOMaster);
        }
Пример #4
0
        public IEnumerable <vmQC> GetDetailInfoByLoanSprID(vmCmnParameters objcmnParam, Int64 LoanSprID, out int recordsTotal)
        {
            GenericFactory_GF_vmQC = new vmQC_GF();
            string             spQuery      = "";
            IEnumerable <vmQC> lstQCByGrrNo = null;

            recordsTotal = 0;
            try
            {
                Hashtable ht = new Hashtable();
                ht.Add("CompanyID", objcmnParam.selectedCompany);
                ht.Add("LoggedUser", objcmnParam.loggeduser);
                ht.Add("PageNo", objcmnParam.pageNumber);
                ht.Add("RowCountPerPage", objcmnParam.pageSize);
                ht.Add("IsPaging", objcmnParam.IsPaging);
                ht.Add("LoanSprID", LoanSprID);

                // spQuery = "[Get_InvPOItemDetailByQCID]";

                spQuery = "[Get_InvItemsDetailByLoanSprID]";

                lstQCByGrrNo = GenericFactory_GF_vmQC.ExecuteQuery(spQuery, ht);
                recordsTotal = lstQCByGrrNo.Count();
            }
            catch (Exception e)
            {
                e.ToString();
            }
            return(lstQCByGrrNo);
        }
Пример #5
0
        public List <vmFinishingInspactionDetail> GetQAMasterList(vmCmnParameters objcmnParam, out int recordsTotal)
        {
            List <vmFinishingInspactionDetail> _objQAMasterList = null;

            recordsTotal = 0;
            try
            {
                using (_ctxCmn = new ERP_Entities())
                {
                    GenericFactory_FabricINspectionMaster_vm = new vmFinishingInspactionDetail_VM();
                    string    spQuery = string.Empty;
                    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);

                    spQuery          = "[Get_FinishingQAMaster]";
                    _objQAMasterList = GenericFactory_FabricINspectionMaster_vm.ExecuteQuery(spQuery, ht).ToList();
                    recordsTotal     = _ctxCmn.PrdFinishingQAMasters.Where(x => x.CompanyID == objcmnParam.loggedCompany && x.IsDeleted == false).Count();
                }
            }
            catch (Exception e)
            {
                e.ToString();
            }
            return(_objQAMasterList);
        }
Пример #6
0
        /// No CompanyID Provided
        /// <summary>
        /// Get Data From Database
        /// <para>Use it when to retive data through a stored procedure</para>
        /// </summary>
        public IEnumerable <vmCmnModule> GetModules(int?companyID, int?userID, int?pageNumber, int?pageSize, int?IsPaging)
        {
            GenericFactoryFor_Module = new vmCmnModule_GF();
            IEnumerable <vmCmnModule> objModules = null;
            string spQuery = string.Empty;

            try
            {
                Hashtable ht = new Hashtable();
                ht.Add("companyID", companyID);
                ht.Add("userID", userID);

                ht.Add("pageNumber", pageNumber);
                ht.Add("pageSize", pageSize);
                ht.Add("IsPaging", IsPaging);

                spQuery    = "[Get_CmnModule]";
                objModules = GenericFactoryFor_Module.ExecuteQuery(spQuery, ht);
            }
            catch (Exception e)
            {
                e.ToString();
            }

            return(objModules);
        }
Пример #7
0
        public IEnumerable <vmPrdWeavingMachineConfigMasterDetail> GetWeavingMachineConfigMaster(vmCmnParameters objcmnParam, out int recordsTotal)
        {
            GenericFactory_vmPrdWeavingMachineConfigMasterDetail_GF = new vmPrdWeavingMachineConfigMasterDetail_GF();
            IEnumerable <vmPrdWeavingMachineConfigMasterDetail> WMCMaster = null;

            recordsTotal = 0;
            string spQuery = string.Empty;

            try
            {
                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);

                spQuery   = "[Get_WeavingMachinConfigMaster]";
                WMCMaster = GenericFactory_vmPrdWeavingMachineConfigMasterDetail_GF.ExecuteQuery(spQuery, ht);

                recordsTotal = (int)WMCMaster.FirstOrDefault().recordsTotal;
            }
            catch (Exception e)
            {
                e.ToString();
            }
            return(WMCMaster);
        }
Пример #8
0
        public IEnumerable <vmStockMaster> GetAllStockItems(vmCmnParameters objcmnParam, out int recordsTotal)
        {
            GenericFactory_EF_Stock = new vmStockMaster_GF();
            IEnumerable <vmStockMaster> objStock = null;
            string spQuery = string.Empty;

            recordsTotal = 0;
            try
            {
                Hashtable ht = new Hashtable();
                ht.Add("itemTypeID", objcmnParam.ItemType);
                ht.Add("ItemGroupID", objcmnParam.ItemGroup);
                ht.Add("itemID", null);
                ht.Add("BatchID", null);
                ht.Add("LotID", null);
                ht.Add("GradeID", null);
                ht.Add("CompanyID", objcmnParam.loggedCompany);
                ht.Add("DepartmentID", objcmnParam.DepartmentID);
                ht.Add("PageNo", objcmnParam.pageNumber);
                ht.Add("RowCountPerPage", objcmnParam.pageNumber);
                ht.Add("IsPaging", objcmnParam.IsPaging);

                // spQuery = "[Get_AllStockItems]";
                spQuery  = "[sp_getStockInfo]";
                objStock = GenericFactory_EF_Stock.ExecuteQuery(spQuery, ht);
            }
            catch (Exception e)
            {
                e.ToString();
            }
            return(objStock);
        }
Пример #9
0
        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);
        }
Пример #10
0
        //-------------
        public List <vmSizeBeamIssue> GetSizingMRRMasterDetailByBeamIssueID(int?pageNumber, int?pageSize, int?IsPaging, int?BeamIssueId, int?LoginCompanyID)
        {
            GFactory_VM_SetDetail = new PrdSizeBeamIssue_VM();

            List <vmSizeBeamIssue> _vmSetDetails = null;
            string spQuery = string.Empty;

            try
            {
                using (_ctxCmn = new ERP_Entities())
                {
                    Hashtable ht = new Hashtable();
                    ht.Add("CompanyID", LoginCompanyID);
                    ht.Add("LoggedUser", 0);
                    ht.Add("PageNo", 0);
                    ht.Add("RowCountPerPage", 0);
                    ht.Add("IsPaging", 0);
                    ht.Add("BeamIssueID", BeamIssueId);
                    spQuery       = "[Get_PrdSizingMRRMasterDetailByBeamIssueID]";
                    _vmSetDetails = GFactory_VM_SetDetail.ExecuteQuery(spQuery, ht).ToList();
                }
            }
            catch (Exception e)
            {
                e.ToString();
            }

            return(_vmSetDetails);
        }
Пример #11
0
        /// <summary>
        /// Save Data To Database
        /// <para>Use it when save data through a stored procedure</para>
        /// </summary>
        public int UpdateOrganogram(CmnOrganogram model)
        {
            GenericFactoryFor_Organogram = new vmCmnOrganogram_GF();
            int result = 0;

            try
            {
                Hashtable ht = new Hashtable();
                ht.Add("OrganogramID", model.OrganogramID);
                ht.Add("CustomCode", model.CustomCode);
                ht.Add("OrganogramName", model.OrganogramName);
                ht.Add("ParentID", model.ParentID);
                //ht.Add("IsCostCenter", model.IsCostCenter);
                //ht.Add("IsDefault", model.IsDefault);
                //ht.Add("StatusID", model.StatusID);
                ht.Add("CompanyID", model.CompanyID);
                ht.Add("CreateBy", model.CreateBy);
                ht.Add("CreateOn", DateTime.Now);
                ht.Add("CreatePc", HostService.GetIP());
                ht.Add("UpdateBy", 1);
                ht.Add("UpdateOn", DateTime.Now);
                ht.Add("UpdatePc", HostService.GetIP());
                ht.Add("IsDeleted", model.IsDeleted);
                ht.Add("DeleteBy", model.DeleteBy);
                ht.Add("DeleteOn", model.DeleteOn);
                ht.Add("DeletePc", model.DeletePc);
                string spQuery = "[Put_CmnOrganogram]";
                result = GenericFactoryFor_Organogram.ExecuteCommand(spQuery, ht);
            }
            catch (Exception e)
            {
                e.ToString();
            }
            return(result);
        }
Пример #12
0
        public vmSizeBeamIssue GetSetDeatailBySetNo(int?pageNumber, int?pageSize, int?IsPaging, int?SetNo, int?LoginCompanyID)
        {
            GFactory_VM_SetDetail = new PrdSizeBeamIssue_VM();

            vmSizeBeamIssue _vmSetDetails = null;
            string          spQuery       = string.Empty;

            try
            {
                using (_ctxCmn = new ERP_Entities())
                {
                    Hashtable ht = new Hashtable();
                    ht.Add("CompanyID", LoginCompanyID);
                    ht.Add("LoggedUser", 0);
                    ht.Add("PageNo", 0);
                    ht.Add("RowCountPerPage", 0);
                    ht.Add("IsPaging", 0);
                    ht.Add("SetID", SetNo);
                    spQuery       = "[GetPrdIssueDeailsBySetNoForSizeBeam]";
                    _vmSetDetails = GFactory_VM_SetDetail.ExecuteQuery(spQuery, ht).FirstOrDefault();
                }
            }
            catch (Exception e)
            {
                e.ToString();
            }

            return(_vmSetDetails);
        }
Пример #13
0
        //public vmFinishingPackingListMasterDetail GetPIBasedData(vmCmnParameters objcmnParam)
        //{
        //    vmFinishingPackingListMasterDetail PIData = null;
        //    try
        //    {
        //        GenericFactory_vmFinishingPackingListMasterDetail_GF = new vmFinishingPackingListDetail_GF();
        //        string spQuery = string.Empty;
        //        Hashtable ht = new Hashtable();
        //        ht.Add("CompanyID", objcmnParam.loggedCompany);
        //        ht.Add("LoggedUser", objcmnParam.loggeduser);
        //        ht.Add("PIID", objcmnParam.id);
        //        ht.Add("PackingID", objcmnParam.ItemType);

        //        spQuery = "[Get_FinishingPackingPIBasedData]";
        //        PIData = GenericFactory_vmFinishingPackingListMasterDetail_GF.ExecuteQuerySingle(spQuery, ht);
        //    }
        //    catch (Exception e)
        //    {
        //        e.ToString();
        //    }
        //    return PIData;
        //}

        public List <vmFinishingPackingListMasterDetail> GetPackingMasterList(vmCmnParameters objcmnParam, out int recordsTotal)
        {
            GenericFactory_vmFinishingPackingListMasterDetail_GF = new vmFinishingPackingListDetail_GF();
            List <vmFinishingPackingListMasterDetail> ListPMaster = null;
            string spQuery = string.Empty;

            recordsTotal = 0;
            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);

                    spQuery      = "[Get_PackingMasterList]";
                    ListPMaster  = GenericFactory_vmFinishingPackingListMasterDetail_GF.ExecuteQuery(spQuery, ht).ToList();
                    recordsTotal = _ctxCmn.PrdFinishingPackingLists.Where(x => x.CompanyID == objcmnParam.loggedCompany && x.IsDeleted == false).Count();
                }
            }
            catch (Exception e)
            {
                e.ToString();
            }
            return(ListPMaster);
        }
Пример #14
0
        /// CompanyID Provided but Static
        public vmFinishGood GetRawMaterial(int id, int typeId, int companyId)
        {
            GenericFactoryFor_FabricDevelopment = new FabricDevelopment_EF();
            vmFinishGood _objFinishGood = null;
            string       spQuery        = string.Empty;

            try
            {
                using (_ctxCmn = new ERP_Entities())
                {
                    Hashtable ht = new Hashtable();
                    ht.Add("CompanyID", companyId);
                    ht.Add("LoggedUser", 0);

                    ht.Add("PageNo", 0);
                    ht.Add("RowCountPerPage", 0);
                    ht.Add("IsPaging", 0);
                    ht.Add("ItemTypeID", typeId);
                    ht.Add("ItemGroupID", 0);
                    ht.Add("ItemID", id);
                    spQuery        = "[SPGetItemDetail]";
                    _objFinishGood = GenericFactoryFor_FabricDevelopment.ExecuteQuery(spQuery, ht).FirstOrDefault();
                }
            }
            catch (Exception e)
            {
                e.ToString();
            }
            return(_objFinishGood);
        }
Пример #15
0
        public List <vmItemGroup> GetAllItemGroups(vmCmnParameters objcmnParam, out int recordsTotal)
        {
            GenericFactoryFor_VmItemGroup = new vmItemGroup_GF();
            List <vmItemGroup> _objvmItemGroups = null;
            string             spQuery          = string.Empty;

            recordsTotal = 0;
            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);

                    spQuery          = "[SPGetItemGroupDetail]";
                    _objvmItemGroups = GenericFactoryFor_VmItemGroup.ExecuteQuery(spQuery, ht).ToList();

                    recordsTotal = _ctxCmn.CmnItemGroups.Count();
                }
            }
            catch (Exception e)
            {
                e.ToString();
            }

            return(_objvmItemGroups);
        }
Пример #16
0
        public IEnumerable <vmSetMaster> GetSetSetupMaster(vmCmnParameters objcmnParam, out int recordsTotal)
        {
            GFactory_VM_PrdSetMaster = new PrdSetMaster_VM();
            IEnumerable <vmSetMaster> objSetMaster = null;

            string spQuery = string.Empty;

            recordsTotal = 0;
            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);

                    spQuery      = "[Get_SetMaster]";
                    objSetMaster = GFactory_VM_PrdSetMaster.ExecuteQuery(spQuery, ht);

                    recordsTotal = _ctxCmn.PrdSetMasters.Where(x => x.CompanyID == objcmnParam.loggedCompany && x.IsDeleted == false).Count();//objSetMaster.Count();
                }
            }
            catch (Exception e)
            {
                e.ToString();
            }

            return(objSetMaster);
        }
Пример #17
0
        public vmItemGroup GetItemGroupByID(int?GID, int?CompanyID)
        {
            GenericFactoryFor_VmItemGroup = new vmItemGroup_GF();
            vmItemGroup _objvmItemGroup = null;
            string      spQuery         = string.Empty;

            try
            {
                using (_ctxCmn = new ERP_Entities())
                {
                    Hashtable ht = new Hashtable();
                    ht.Add("CompanyID", CompanyID);
                    ht.Add("LoggedUser", 0);
                    ht.Add("PageNo", 0);
                    ht.Add("RowCountPerPage", 0);
                    ht.Add("IsPaging", 0);
                    ht.Add("ItemTypeID", 0);
                    ht.Add("ItemGroupID", GID);
                    spQuery         = "[SPGetItemGroupDetail]";
                    _objvmItemGroup = GenericFactoryFor_VmItemGroup.ExecuteQuery(spQuery, ht).FirstOrDefault();
                }
            }
            catch (Exception e)
            {
                e.ToString();
            }
            return(_objvmItemGroup);
        }
Пример #18
0
        public IEnumerable <vmSetSetupMasterDetail> GetSetSetupDetailByID(vmCmnParameters objcmnParam, out int recordsTotal)
        {
            GFactory_VM_PrdSetSetupMasterDetail = new PrdSetSetupMasterDetail_VM();
            IEnumerable <vmSetSetupMasterDetail> objSetDetail = null;

            recordsTotal = 0;
            string spQuery = string.Empty;

            try
            {
                using (_ctxCmn = new ERP_Entities())
                {
                    Hashtable ht = new Hashtable();
                    ht.Add("SetMasterID", objcmnParam.id);

                    spQuery      = "[Get_SetDetailByID]";
                    objSetDetail = GFactory_VM_PrdSetSetupMasterDetail.ExecuteQuery(spQuery, ht);
                }
            }
            catch (Exception e)
            {
                e.ToString();
            }

            return(objSetDetail);
        }
Пример #19
0
        //public int SaveUpdateFebricInspection(PrdFinishingInspactionMaster _objFinishingInspactionMaster, List<vmFinishingInspactionDetail> _objNewInspactionDetails, List<vmFinishingInspactionDetail> _objDeleteInsPectiondetails, vmCmnParameters objcmnParam)
        //{
        //    Int64 InspactionID = 0;
        //    Int64 InspactionDateilID = 0;
        //    int status = 0;
        //    try
        //    {
        //        if (_objFinishingInspactionMaster.InspactionID == 0)
        //        {
        //            InspactionID = SaveInspactionMaster(_objFinishingInspactionMaster, objcmnParam);
        //            if (InspactionID > 0)
        //            {
        //                InspactionDateilID = SaveInspactionDetail(_objNewInspactionDetails, _objFinishingInspactionMaster, InspactionID, objcmnParam);

        //                if (InspactionDateilID > 0)
        //                {
        //                    status = 1;
        //                }
        //            }
        //        }
        //        else
        //        {
        //            status = UpdateFebricInspection(_objNewInspactionDetails, _objDeleteInsPectiondetails, _objFinishingInspactionMaster, objcmnParam);
        //        }

        //    }
        //    catch(Exception e)
        //    {
        //        status = 0;
        //        e.ToString();
        //    }
        //    return status;
        //}

        //private int UpdateFebricInspection(List<vmFinishingInspactionDetail> _objInspactionDetailsList, List<vmFinishingInspactionDetail> _objDeleteInsPectiondetails, PrdFinishingInspactionMaster _objFinishingInspactionMaster, vmCmnParameters objcmnParam)
        //{
        //    int status = 0;
        //    try
        //    {
        //        if (_objInspactionDetailsList.Count > 0)
        //        {
        //            SaveInspactionDetail(_objInspactionDetailsList, _objFinishingInspactionMaster, _objFinishingInspactionMaster.InspactionID, objcmnParam);
        //        }
        //        if (_objInspactionDetailsList.Count > 0)
        //        {
        //            UpdateInspactionDetail(_objInspactionDetailsList, _objFinishingInspactionMaster, objcmnParam);

        //        }
        //        if (_objDeleteInsPectiondetails.Count > 0)
        //        {

        //            DeleteInspactionDetail(_objDeleteInsPectiondetails, _objFinishingInspactionMaster, objcmnParam);
        //        }
        //        status = 1;
        //    }
        //    catch(Exception e)
        //    {
        //        status = 0;
        //        e.ToString();
        //    }
        //    return status;

        //}

        //private int DeleteInspactionDetail(List<vmFinishingInspactionDetail> _objDeleteInsPectiondetails, PrdFinishingInspactionMaster _objFinishingInspactionMaster, vmCmnParameters objcmnParam)
        //{
        //    int status = 0;
        //    try
        //    {
        //        GenericFactory_EFFinishingInspactionDetails = new PrdFinishingInspactionDetail_EF();
        //        foreach (vmFinishingInspactionDetail aitem in _objDeleteInsPectiondetails)
        //        {
        //            PrdFinishingInspactionDetail _FabricInspactionDetail = GenericFactory_EFFinishingInspactionDetails.GetAll().Where(x => x.InspactionDateilID == aitem.InspactionDateilID).FirstOrDefault();
        //            _FabricInspactionDetail.DeleteBy = objcmnParam.loggeduser;
        //            _FabricInspactionDetail.IsDeleted = true;
        //            _FabricInspactionDetail.DeleteOn = DateTime.Now;
        //            _FabricInspactionDetail.DeletePc =  HostService.GetIP();
        //            GenericFactory_EFFinishingInspactionDetails.Update(_FabricInspactionDetail);
        //            GenericFactory_EFFinishingInspactionDetails.Save();

        //        }
        //        status = 1;
        //    }
        //    catch(Exception e)
        //    {
        //        e.ToString();
        //    }
        //    return status;
        //}

        //private int UpdateInspactionDetail(List<vmFinishingInspactionDetail> _objUpdateInspectionDetails, PrdFinishingInspactionMaster _objFinishingInspactionMaster, vmCmnParameters objcmnParam)
        //{
        //    int status = 0;
        //    try
        //    {
        //        GenericFactory_EFFinishingInspactionDetails = new PrdFinishingInspactionDetail_EF();
        //        foreach (vmFinishingInspactionDetail aitem in _objUpdateInspectionDetails.Where(x => x.ModelStatus == "Update"))
        //        {
        //            PrdFinishingInspactionDetail _FabricInspactionDetail = GenericFactory_EFFinishingInspactionDetails.GetAll().Where(x => x.InspactionDateilID == aitem.InspactionDateilID).FirstOrDefault();
        //            _FabricInspactionDetail.BeamNo = aitem.BeamNo;
        //            _FabricInspactionDetail.RollNo = aitem.RollNo;
        //            _FabricInspactionDetail.Length = aitem.GreigeLength;
        //            _FabricInspactionDetail.Piece = aitem.Piece;
        //            _FabricInspactionDetail.DefecetPointID = aitem.DefectPoint;
        //            _FabricInspactionDetail.GrossWeight = aitem.GrossWt;
        //            _FabricInspactionDetail.NetWeight = aitem.NetWt;
        //            _FabricInspactionDetail.Remarks = aitem.Remarks;

        //            _FabricInspactionDetail.UpdateBy = objcmnParam.loggeduser;
        //            _FabricInspactionDetail.UpdateOn = DateTime.Now;
        //            _FabricInspactionDetail.UpdatePc =  HostService.GetIP();
        //            GenericFactory_EFFinishingInspactionDetails.Update(_FabricInspactionDetail);
        //            GenericFactory_EFFinishingInspactionDetails.Save();
        //        }
        //        status = 1;
        //    }
        //    catch(Exception e)
        //    {
        //        e.ToString();
        //    }
        //    return status;
        //}

        //private Int64 SaveInspactionDetail(List<vmFinishingInspactionDetail> _objNewInspactionDetails, PrdFinishingInspactionMaster _objFinishingInspactionMaster, Int64 InspactionID, vmCmnParameters objcmnParam)
        //{
        //    GenericFactory_EFFinishingInspactionDetails = new PrdFinishingInspactionDetail_EF();
        //    Int64 NextId = 0;
        //    NextId = GenericFactory_EFFinishingInspactionDetails.getMaxVal_int64("InspactionDateilID", "PrdFinishingInspactionDetail");
        //    foreach (vmFinishingInspactionDetail aitem in _objNewInspactionDetails.Where(x=>x.ModelStatus=="New"))
        //    {
        //        PrdFinishingInspactionDetail _objInspactionDetail = new PrdFinishingInspactionDetail();
        //        _objInspactionDetail.InspactionDateilID = NextId;
        //        _objInspactionDetail.InspactionID = InspactionID;
        //        _objInspactionDetail.BeamNo = aitem.BeamNo;
        //        _objInspactionDetail.RollNo = aitem.RollNo;
        //        _objInspactionDetail.Length = aitem.GreigeLength;
        //        _objInspactionDetail.Piece = aitem.Piece;
        //        _objInspactionDetail.DefecetPointID = aitem.DefectPoint;
        //        _objInspactionDetail.GrossWeight = aitem.GrossWt;
        //        _objInspactionDetail.NetWeight = aitem.NetWt;
        //        _objInspactionDetail.Remarks = aitem.Remarks;

        //        _objInspactionDetail.CompanyID = objcmnParam.loggedCompany;
        //        _objInspactionDetail.CreateBy = objcmnParam.loggeduser;
        //        _objInspactionDetail.CreateOn = DateTime.Now;
        //        _objInspactionDetail.CreatePc =  HostService.GetIP();
        //        _objInspactionDetail.IsDeleted = false;
        //        GenericFactory_EFFinishingInspactionDetails.Insert(_objInspactionDetail);
        //        GenericFactory_EFFinishingInspactionDetails.Save();
        //        NextId++;
        //    }
        //    return NextId;
        //}

        //private Int64 SaveInspactionMaster(PrdFinishingInspactionMaster _objFinishingInspactionMaster, vmCmnParameters objcmnParam)
        //{
        //    Int64 status = 0;
        //    Int64 NextId = 0;
        //    try
        //    {
        //        GenericFactory_EFFinishingInspactionMaster = new PrdFinishingInspactionMaster_EF();
        //        NextId = GenericFactory_EFFinishingInspactionMaster.getMaxVal_int64("InspactionID", "PrdFinishingInspactionMaster");
        //        _objFinishingInspactionMaster.InspactionID = NextId;
        //        _objFinishingInspactionMaster.InspactionNo = NextId.ToString();

        //        _objFinishingInspactionMaster.CompanyID = objcmnParam.loggedCompany;
        //        _objFinishingInspactionMaster.CreateBy = objcmnParam.loggeduser;
        //        _objFinishingInspactionMaster.CreateOn = DateTime.Now;
        //        _objFinishingInspactionMaster.CreatePc =  HostService.GetIP();
        //        _objFinishingInspactionMaster.IsDeleted = false;
        //        _objFinishingInspactionMaster.IsQAComplete = false;
        //        GenericFactory_EFFinishingInspactionMaster.Insert(_objFinishingInspactionMaster);
        //        GenericFactory_EFFinishingInspactionMaster.Save();

        //        status = NextId;
        //    }
        //    catch(Exception e)
        //    {
        //        e.ToString();
        //    }
        //    return status;
        //}

        public List <vmFabricInspectionMaster> FabricInspectionDetails(vmCmnParameters objcmnParam, out int recordsTotal)
        {
            GenericFactory_FabricINspectionMaster = new PrdFabricInspectionMaster_VM();
            List <vmFabricInspectionMaster> _objFabricInspectionMasters = null;
            string spQuery = string.Empty;

            recordsTotal = 0;
            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);

                    spQuery = "[Get_FabricInspectionDetails]";
                    _objFabricInspectionMasters = GenericFactory_FabricINspectionMaster.ExecuteQuery(spQuery, ht).ToList();
                    recordsTotal = _ctxCmn.PrdWeavingMachinConfigs.Where(x => x.CompanyID == objcmnParam.loggedCompany && x.IsDeleted == false).Count();
                }
            }
            catch (Exception e)
            {
                e.ToString();
            }
            return(_objFabricInspectionMasters);
        }
Пример #20
0
        public IEnumerable <vmWastageMasterDetail> GetWastageDetailByID(vmCmnParameters objcmnParam, out int recordsTotal)
        {
            GenericFactory_vmWastageMasterDetail_VM = new vmWastageMasterDetail_VM();
            IEnumerable <vmWastageMasterDetail> WastageDetailByID = null;

            recordsTotal = 0;
            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("WastageID", objcmnParam.id);

                    spQuery           = "[Get_WastageMRRDetailByID]";
                    WastageDetailByID = GenericFactory_vmWastageMasterDetail_VM.ExecuteQuery(spQuery, ht);

                    recordsTotal = WastageDetailByID.Count();
                }
            }
            catch (Exception e)
            {
                e.ToString();
            }
            return(WastageDetailByID);
        }
Пример #21
0
        public IEnumerable <vmQC> GetQCListByGrrNo(vmCmnParameters objcmnParam, Int64 grrID, out int recordsTotal)
        {
            GenericFactory_GF_vmQC = new vmQC_GF();
            string             spQuery      = "";
            IEnumerable <vmQC> lstQCByGrrNo = null;

            recordsTotal = 0;
            try
            {
                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("GrrID", grrID);

                spQuery = "[Get_InvQCByGrrPostType]";

                lstQCByGrrNo = GenericFactory_GF_vmQC.ExecuteQuery(spQuery, ht);

                recordsTotal = lstQCByGrrNo.Count();
            }
            catch (Exception e)
            {
                e.ToString();
            }
            return(lstQCByGrrNo);
        }
Пример #22
0
        public List <vmPrdWeavingMachineConfigMasterDetail> GetMntMachineMaintenanceOrde(vmCmnParameters objcmnParam, out int recordsTotal)
        {
            GenericFactory_vmPrdWeavingMachineConfigMasterDetail = new vmPrdWeavingMachineConfigMasterDetail_GF();
            List <vmPrdWeavingMachineConfigMasterDetail> _objWeavingMachine = null;
            string spQuery = string.Empty;

            recordsTotal = 0;
            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("IsTrue", objcmnParam.IsTrue);


                    spQuery            = "[Get_MntMachineMaintenanceOrder]";
                    _objWeavingMachine = GenericFactory_vmPrdWeavingMachineConfigMasterDetail.ExecuteQuery(spQuery, ht).ToList();

                    recordsTotal = _ctxCmn.MntMachineMaintenanceOrders.Count();
                }
            }
            catch (Exception e)
            {
                e.ToString();
            }

            return(_objWeavingMachine);
        }
Пример #23
0
        public IEnumerable <vmQC> GetMrrDetailsListByMrrID(vmCmnParameters objcmnParam, Int64 mrrID, out int recordsTotal)
        {
            GenericFactory_GF_vmQC = new vmQC_GF();
            string             spQuery = "";
            IEnumerable <vmQC> lstMrrDetailsByMrrID = null;

            recordsTotal = 0;
            try
            {
                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("MrrID", mrrID);

                spQuery = "[Get_InvMrrMasterDetailByMrrID]";

                lstMrrDetailsByMrrID = GenericFactory_GF_vmQC.ExecuteQuery(spQuery, ht);

                recordsTotal = lstMrrDetailsByMrrID.Count();
            }
            catch (Exception e)
            {
                e.ToString();
            }
            return(lstMrrDetailsByMrrID);
        }
Пример #24
0
        public List <vmWeavingLine> GetWeavingMachineConfigurations(vmCmnParameters objcmnParam, out int recordsTotal)
        {
            GenericFactory_PrdWeavingLine_vm = new PrdWeavingLine_VM();
            List <vmWeavingLine> _objWeavingMachine = null;
            string spQuery = string.Empty;

            recordsTotal = 0;
            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);


                    spQuery            = "[Get_PrdWeavingMachingConfig]";
                    _objWeavingMachine = GenericFactory_PrdWeavingLine_vm.ExecuteQuery(spQuery, ht).ToList();

                    recordsTotal = _ctxCmn.PrdWeavingMachinConfigs.Count();
                }
            }
            catch (Exception e)
            {
                e.ToString();
            }

            return(_objWeavingMachine);
        }
Пример #25
0
        public IEnumerable <PurchaseQuotationMaster> GetStatementNo(vmCmnParameters objcmnParam, out int recordsTotal)
        {
            GFactory_GF_Quotation = new PurchaseQuotationMaster_GF();
            IEnumerable <PurchaseQuotationMaster> objPurchaseCSMaster = null;
            //  IEnumerable<PurchaseQuotationMaster> objPurchaseCSMasterWithoutPaging = null;
            string spQuery = "";

            recordsTotal = 0;
            using (_ctxCmn = new ERP_Entities())
            {
                try
                {
                    //objPurchaseCSMasterWithoutPaging = (from stmnt in _ctxCmn.PurchaseQuotationMasters.Where(m => m.IsDeleted == false && m.CompanyID == objcmnParam.loggedCompany && m.IsConfirm == true) select stmnt).ToList().Select(m => new PurchaseQuotationMaster { QuotationID = m.QuotationID, QuotationNo = m.QuotationNo }).ToList();
                    //objPurchaseCSMaster = objPurchaseCSMasterWithoutPaging.OrderByDescending(x => x.QuotationID).Skip(objcmnParam.pageNumber).Take(objcmnParam.pageSize).ToList();
                    //recordsTotal = objPurchaseCSMasterWithoutPaging.Count();

                    Hashtable ht = new Hashtable();
                    ht.Add("pageNumber", objcmnParam.pageNumber);
                    ht.Add("pageSize", objcmnParam.pageSize);
                    ht.Add("IsPaging", objcmnParam.IsPaging);
                    ht.Add("CompanyId", objcmnParam.loggedCompany);
                    spQuery             = "Get_PurchaseQuotation";
                    objPurchaseCSMaster = GFactory_GF_Quotation.ExecuteQuery(spQuery, ht);
                    recordsTotal        = objPurchaseCSMaster.Count();
                }
                catch (Exception e)
                {
                    e.ToString();
                }
            }
            return(objPurchaseCSMaster);
        }
Пример #26
0
        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);
        }
Пример #27
0
        public IEnumerable <vmChallan> GetPODetailByPOID(vmCmnParameters objcmnParam, Int64 poID, out int recordsTotal)
        {
            GenericFactory_GF_vmChallan = new vmChallan_GF();
            string spQuery = "";
            IEnumerable <vmChallan> lstItemDetailByPOID = null;

            recordsTotal = 0;
            try
            {
                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("POID", poID);

                spQuery = "[Get_PurPOListByPOID]";

                lstItemDetailByPOID = GenericFactory_GF_vmChallan.ExecuteQuery(spQuery, ht);

                recordsTotal = lstItemDetailByPOID.Count();
            }
            catch (Exception e)
            {
                e.ToString();
            }
            return(lstItemDetailByPOID);
        }
Пример #28
0
        public IEnumerable <InvRequisitionMaster> GetRequisitionNo(int?pageNumber, int?pageSize, int?IsPaging, int CompanyID, int RequisitionTypeID)
        {
            GenericFactory_GF_Requisition = new InvRequisitionMaster_GF();
            IEnumerable <InvRequisitionMaster> objRequisitionList = null;
            string spQuery = string.Empty;

            try
            {
                //objRequisitionList = GenericFactory_EF_RequisitionMaster.GetAll().Select(m => new InvRequisitionMaster { RequisitionID = m.RequisitionID, RequisitionNo = m.RequisitionNo, IsDeleted = m.IsDeleted }).Where(s => s.IsDeleted == false).ToList();

                Hashtable ht = new Hashtable();
                ht.Add("CompanyId", CompanyID);
                ht.Add("pageNumber", pageNumber);
                ht.Add("pageSize", pageSize);
                ht.Add("IsPaging", IsPaging);
                ht.Add("RequisitionTypeID", RequisitionTypeID);
                spQuery            = "[dbo].[Get_InvRequisitionList]";
                objRequisitionList = GenericFactory_GF_Requisition.ExecuteQuery(spQuery, ht);
            }
            catch (Exception e)
            {
                e.ToString();
            }
            return(objRequisitionList);
        }
Пример #29
0
        public IEnumerable <vmChallan> GetItemMasterById(vmCmnParameters objcmnParam, out int recordsTotal)
        {
            GenericFactory_GF_vmChallan = new vmChallan_GF();
            //  int itemGroupId = Convert.ToInt32(groupId);

            string spQuery = "";
            IEnumerable <vmChallan> objItemMaster = null;

            recordsTotal = 0;
            try
            {
                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("ItemGroupID", itemGroupId);

                spQuery = "[Get_Item]";

                objItemMaster = GenericFactory_GF_vmChallan.ExecuteQuery(spQuery, ht);

                recordsTotal = objItemMaster.Count();
            }
            catch (Exception e)
            {
                e.ToString();
            }
            return(objItemMaster);
        }
Пример #30
0
        public IEnumerable <vmGrr> GetMrrMasterList(vmCmnParameters objcmnParam, out int recordsTotal)
        {
            GenericFactory_GF_vmGrr = new vmGrr_GF();
            string spQuery = "";
            IEnumerable <vmGrr> lstMrrMaster = null;

            recordsTotal = 0;
            try
            {
                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("TransactionTypeID", objcmnParam.tTypeId);

                spQuery = "[Get_InvMrrMasterInfo]";

                lstMrrMaster = GenericFactory_GF_vmGrr.ExecuteQuery(spQuery, ht);

                recordsTotal = (int)lstMrrMaster.FirstOrDefault().RecordTotal;
            }
            catch (Exception e)
            {
                e.ToString();
            }
            return(lstMrrMaster);
        }