Beispiel #1
0
        public int Update(Stock obj, String Original_ItemCode)
        {
            try
            {
                SqlParameter[] paramList = new SqlParameter[] {
                    new SqlParameter("@StoreID", obj.StockStore.StoreID),
                    new SqlParameter("@StockType", obj.StockType),
                    new SqlParameter("@StockMaterialID", obj.StockMaterial.MaterialCode),
                    new SqlParameter("@StockBasicProduct", obj.StockBasicProduct.BasicProductCode),
                    new SqlParameter("@StockFinishProduct", obj.StockFinishProduct.FinishProductCode),
                    new SqlParameter("@StockQty", obj.StockQty),
                    new SqlParameter("@StockReorderLevel", obj.StockReorderLevel),
                    new SqlParameter("@StockMinimumQty", obj.StockMinimumQty),
                    new SqlParameter("@StockMaximumQty", obj.StockMaximumQty),
                    new SqlParameter("@StockEconomicalQty", obj.StockEconomicalQty),
                    new SqlParameter("@StockReservedQty", obj.StockReservedQty),
                    new SqlParameter("@StockStatus", obj.StockStatus),
                    new SqlParameter("@StockUnitPrice", obj.StockUnitPrice),
                    new SqlParameter("@Original_StockItemCode", obj.StockUnitPrice)
                };

                return(Execute.RunSP_RowsEffected(Connection, "SPUPDATE_Stock_All", paramList));
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message, ex);
            }
        }
Beispiel #2
0
        public long Add(QCReport obj)
        {
            try
            {
                SqlParameter[] paramList = new SqlParameter[] {
                    new SqlParameter("@QCReportID", obj.QCReportID),
                    new SqlParameter("@ReportType", obj.ReportType),
                    new SqlParameter("@RPDBatchID", obj.RPDBatchID),
                    new SqlParameter("@PRPDBatchID", obj.PRPDBatchID),
                    new SqlParameter("@ProductionBatchID", obj.ProductionBatchID),
                    new SqlParameter("@PackingBatchID", obj.PackingBatchID),
                    new SqlParameter("@AnalyzedBy", obj.AnalyzedBy),
                    new SqlParameter("@RDQAOfficer", obj.RDQAOfficer),
                    new SqlParameter("@TestBy", obj.TestBy),
                    new SqlParameter("@SendBy", obj.SendBy),
                    new SqlParameter("@SendDate", obj.SendDate),
                    new SqlParameter("@SampleSize", obj.SampleSize),
                    new SqlParameter("@Remarks", obj.Remarks),
                    new SqlParameter("@SpecificGravity", obj.SpecificGravity),
                    new SqlParameter("@Status", obj.Status),
                    new SqlParameter("@outParam", SqlDbType.Int)
                    {
                        Direction = ParameterDirection.Output
                    }
                };

                return(Execute.RunSP_RowsEffected(Connection, "SPADD_QCReport_Update", paramList));
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message, ex);
            }
        }
Beispiel #3
0
        public int Add(BasicProduct objBasicProduct, int DepID, int SectionID)
        {
            try
            {
                SqlParameter[] paramList = new SqlParameter[] {
                    new SqlParameter("@BasicProductCode", objBasicProduct.BasicProductCode),
                    new SqlParameter("@BasicProductName", objBasicProduct.BasicProductName),
                    new SqlParameter("@BasicProductDescription", objBasicProduct.BasicProductDescription),
                    new SqlParameter("@BasicProductSubCatID", objBasicProduct.BasicProductSubCategory.CategoryID),
                    new SqlParameter("@BasicProductCatID", objBasicProduct.BasicProductCategory.CategoryID),
                    new SqlParameter("@BasicProductUnitID", objBasicProduct.BasicProductUnit.UnitID),
                    new SqlParameter("@BasicProductFormID", objBasicProduct.BasicProductForm.FormID),
                    new SqlParameter("@BasicProductAvgCost", objBasicProduct.BasicProductAVGCost),
                    new SqlParameter("@BasicProductStatus", objBasicProduct.BasicProductStatus),
                    new SqlParameter("@BasicProductType", objBasicProduct.BasicProductType),
                    new SqlParameter("@STDBatchSize", objBasicProduct.STDBatchSize),
                    new SqlParameter("@DepID", DepID),
                    new SqlParameter("@SectionID", SectionID)
                };

                return(Execute.RunSP_RowsEffected(Connection, "SPADD_BasicProduct", paramList));
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message, ex);
            }
        }
Beispiel #4
0
        public int Update(BasicProduct objBasicProduct, String OriginalBasicCode)
        {
            try
            {
                SqlParameter[] paramList = new SqlParameter[] {
                    new SqlParameter("@BasicProductCode", objBasicProduct.BasicProductCode),
                    new SqlParameter("@BasicProductName", objBasicProduct.BasicProductName),
                    new SqlParameter("@BasicProductDescription", objBasicProduct.BasicProductDescription),
                    new SqlParameter("@BasicProductSubCatID", objBasicProduct.BasicProductSubCategory.CategoryID),
                    new SqlParameter("@BasicProductCatID", objBasicProduct.BasicProductCategory.CategoryID),
                    new SqlParameter("@BasicProductUnitID", objBasicProduct.BasicProductUnit.UnitID),
                    new SqlParameter("@BasicProductFormID", objBasicProduct.BasicProductForm.FormID),
                    new SqlParameter("@BasicProductFormulaID", objBasicProduct.BasicProductFormula.FormulaID),
                    new SqlParameter("@BasicProductAvgCost", objBasicProduct.BasicProductAVGCost),
                    new SqlParameter("@BasicProductStatus", objBasicProduct.BasicProductStatus),
                    new SqlParameter("@BasicProductType", objBasicProduct.BasicProductType),
                    new SqlParameter("@Original_BasicProductCode", OriginalBasicCode)
                };

                return(Execute.RunSP_RowsEffected(Connection, "SPUPDATE_BasicProduct", paramList));
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message, ex);
            }
        }
Beispiel #5
0
        public int Update(Supplier obj)
        {
            try
            {
                SqlParameter[] paramList = new SqlParameter[] {
                    new SqlParameter("@SupplierType", obj.SupplierType),
                    new SqlParameter("@SupName", obj.SupplieName),
                    new SqlParameter("@SupAddress", obj.SupplierAddress),
                    new SqlParameter("@SupPhone", obj.SupplierPhone),
                    new SqlParameter("@SupMobile", obj.SupplierMobile),
                    new SqlParameter("@SubEmail", obj.SupplierEmail),
                    new SqlParameter("@SupFax", obj.SupplierFax),
                    new SqlParameter("@SupVat", obj.SupplierVat),
                    new SqlParameter("@SupVatNumber", obj.SupplierVATNo),
                    new SqlParameter("@SupContactPerson", obj.SupplierContactPerson),
                    new SqlParameter("@SupplierStatus", obj.SupplierStatus),
                    new SqlParameter("@SupplierCode", obj.SupplierNameCode),
                    new SqlParameter("@Original_SupplierID", obj.SupplierNameCode)
                };

                return(Execute.RunSP_RowsEffected(Connection, "SPUPDATE_Supplier", paramList));
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message, ex);
            }
        }
Beispiel #6
0
        public long Add(Customer obj)
        {
            try
            {
                SqlParameter[] paramList = new SqlParameter[] {
                    new SqlParameter("@CustomerID", obj.CustomerID),
                    new SqlParameter("@Name", obj.Name),
                    new SqlParameter("@Address", obj.Address),
                    new SqlParameter("@Telephone", obj.Telephone),
                    new SqlParameter("@ProductType", obj.ProductType),
                    new SqlParameter("@SalesMethod", obj.SalesMethod),
                    new SqlParameter("@Territory", obj.Territory),
                    new SqlParameter("@outParam", SqlDbType.Int, 120)
                    {
                        Direction = ParameterDirection.Output
                    }
                };

                return(Execute.RunSP_RowsEffected(Connection, "SPADD_Customer", paramList));
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message, ex);
            }
        }
Beispiel #7
0
        public int Update_RPD(BatchPackingMR obj, MTN.Status MTNState, MTN.Type MTNType, MTN.ItemType MTNItemType, string EnteredBy)
        {
            try
            {
                SqlParameter[] paramList = new SqlParameter[] {
                    new SqlParameter("@BatchID", obj.BatchID),
                    new SqlParameter("@BatchUsed", obj.BatchUsed),
                    new SqlParameter("@BatchDamaged", obj.BatchDamaged),
                    new SqlParameter("@BatchReturned", obj.BatchReturned),
                    new SqlParameter("@State", obj.State),
                    new SqlParameter("@MTNStatus", Convert.ToInt32(MTNState)),
                    new SqlParameter("@MTNType", Convert.ToInt32(MTNType)),
                    new SqlParameter("@MTNItemType", Convert.ToInt32(MTNItemType)),
                    new SqlParameter("@EnteredBy", EnteredBy),
                    new SqlParameter("@IssuedBy", Convert.ToInt32(MTNType)),
                    new SqlParameter("@StartQty", obj.StartQty),
                    new SqlParameter("@ID", obj.ID)
                };

                return(Execute.RunSP_RowsEffected(Connection, "SPUPDATE_BatchPackingMR_RPD", paramList));
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message, ex);
            }
        }
Beispiel #8
0
        public long Add(Supplier obj)
        {
            try
            {
                SqlParameter[] paramList = new SqlParameter[] {
                    new SqlParameter("@SupplierType", obj.SupplierType),
                    new SqlParameter("@SupName", obj.SupplieName),
                    new SqlParameter("@SupAddress", obj.SupplierAddress),
                    new SqlParameter("@SupPhone", obj.SupplierPhone),
                    new SqlParameter("@SupMobile", obj.SupplierMobile),
                    new SqlParameter("@SupEmail", obj.SupplierEmail),
                    new SqlParameter("@SupFax", obj.SupplierFax),
                    new SqlParameter("@SupVat", obj.SupplierVat),
                    new SqlParameter("@SupVatNumber", obj.SupplierVATNo),
                    new SqlParameter("@SupContactPerson", obj.SupplierContactPerson),
                    new SqlParameter("@SupplierStatus", obj.SupplierStatus),
                    new SqlParameter("@SupplierCode", obj.SupplierNameCode),
                    new SqlParameter("@outParam", SqlDbType.Int)
                    {
                        Direction = ParameterDirection.Output
                    }
                };

                return(Execute.RunSP_RowsEffected(Connection, "SPADD_Supplier", paramList));
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message, ex);
            }
        }
        public int Add_For_GeneralAct(PRPDBatchActivityDetails obj)
        {
            try
            {


                SqlParameter[] paramList = new SqlParameter[] {
                
                new SqlParameter("@PRPDBatchBatchActID", obj.PRPDBatchActivity),
                new SqlParameter("@SubActivity", obj.SubActivity),
                new SqlParameter("@ActivityDate", obj.ActivityDate),
                new SqlParameter("@StartTime", obj.StartTime),
                new SqlParameter("@StopTime", obj.StopTime),
                new SqlParameter("@StartQty", obj.StartQty),
                new SqlParameter("@StopQty", obj.StopQty),
                new SqlParameter("@SupervisedBy", obj.SupervisedBy),
                new SqlParameter("@Remarks", obj.Remarks),
                new SqlParameter("@PRPDBatchActDetailsID", obj.PRPDBatchActDetailsID)};

                return Execute.RunSP_RowsEffected(Connection, "SPADD_PRPDBatchActivityDetailsGen", paramList);

            }
            catch (Exception ex)
            {

                throw new Exception(ex.Message, ex);
            }

        }
        public int AddActWithMachine(PRPDBatchActivityDetails obj)
        {
            try
            {


                SqlParameter[] paramList = new SqlParameter[] {
                
                new SqlParameter("@PRPDBatchBatchActID", obj.PRPDBatchActivity),
                new SqlParameter("@SubActivity", obj.SubActivity),
                new SqlParameter("@ActivityDate", obj.ActivityDate),
                new SqlParameter("@StartTime", obj.StartTime),
                new SqlParameter("@StartQty", obj.StartQty),
                new SqlParameter("@SupervisedBy", obj.SupervisedBy),
                new SqlParameter("@Remarks", obj.Remarks),
                new SqlParameter("@NoOfTrays", obj.NoOfTrays),
                new SqlParameter("@WeightLoss", obj.WeightLoss),
                new SqlParameter("@ID", obj.PRPDBatchActDetailsID)};

                return Execute.RunSP_RowsEffected(Connection, "SPADD_PRPDBatchActivityDetails", paramList);

            }
            catch (Exception ex)
            {

                throw new Exception(ex.Message, ex);
            }

        }
        public int Update(PRPDBatchActivityDetails obj, long Original_PRPDBatchActDetailsID)
        {

            try
            {


                SqlParameter[] paramList = new SqlParameter[] {
                
                new SqlParameter("@PRPDBatchBatchActID", obj.PRPDBatchActivity),
                new SqlParameter("@SubActivity", obj.SubActivity),
                new SqlParameter("@ActivityDate", obj.ActivityDate),
                new SqlParameter("@StartTime", obj.StartTime),
                new SqlParameter("@StopTime", obj.StopTime),
                new SqlParameter("@StartQty", obj.StartQty),
                new SqlParameter("@StopQty", obj.StopQty),
                new SqlParameter("@SupervisedBy", obj.SupervisedBy),
                new SqlParameter("@Remarks",obj.Remarks),
                new SqlParameter("@Original_PRPDBatchActDetailsID", obj.PRPDBatchActDetailsID)};

                return Execute.RunSP_RowsEffected(Connection, "SPUPDATE_PRPDBatchActivityDetails", paramList);

            }
            catch (Exception ex)
            {

                throw new Exception(ex.Message, ex);
            }

        }
Beispiel #12
0
        public int Add(RPDBatch obj)
        {
            try
            {
                SqlParameter[] paramList = new SqlParameter[] {
                    new SqlParameter("@RPDBatchID", obj.RPDBatchID),
                    new SqlParameter("@RPDBatchSuperviserID", obj.RPDBatchSupervisedBy),
                    new SqlParameter("@RPDBatchMaterialCode", obj.RPDBatchMaterial),
                    new SqlParameter("@RPDBatchQty", obj.RPDBatchQty),
                    new SqlParameter("@RPDBatchInstructedBy", obj.RPDBatchInstructedBy),
                    new SqlParameter("@RPDBatchInstructedDate", obj.RPDBatchInstructedDate),
                    new SqlParameter("@RPDBatchStartDate", obj.RPDBatchStartDate),
                    new SqlParameter("@RPDBatchEndDate", obj.RPDBatchEndDate),
                    new SqlParameter("@RPDBatchFinalQty", obj.RPDBatchFinalQty),
                    new SqlParameter("@RPDBatchStatus", obj.Status),
                    new SqlParameter("@RPDBatchMRNO", obj.RPDBatchMR),
                    new SqlParameter("@RPDBatchType", obj.Type),
                    new SqlParameter("@RPDBatchApprovedBy", obj.ApprovedBy),
                    new SqlParameter("@RPDBatchApprovedDate", obj.ApprovedDate),
                    new SqlParameter("@RPDBatchEndBy", obj.EndBy)
                };

                return(Execute.RunSP_RowsEffected(Connection, "SPADD_RPDBatch", paramList));
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message, ex);
            }
        }
Beispiel #13
0
        public int Add(Machine obj)
        {
            try
            {
                SqlParameter[] paramList = new SqlParameter[] {
                    new SqlParameter("@MachineCode", obj.MachineCode),
                    new SqlParameter("@MachineName", obj.MachineName),
                    new SqlParameter("@MachineSupplierID", obj.MachineSupplier),
                    new SqlParameter("@MachineTypeID", obj.MachineType.MachineTypeID),
                    new SqlParameter("@MachineDescription", obj.MachineDescription),
                    new SqlParameter("@MachinHourCost", obj.MachineHourCost),
                    new SqlParameter("@MachineCapacity", obj.MachineCapacity),
                    new SqlParameter("@MachineCapacityUnitID", obj.MachineCapacityUnit.UnitID),
                    new SqlParameter("@MachineValue", obj.MachineValue),
                    new SqlParameter("@MachinePurchaseDate", obj.MachinePurchaseDate),
                    new SqlParameter("@MachineTransferDetails", obj.MachineTransferDetails),
                    new SqlParameter("@MachinePropertyTag", obj.MachinePropertyTag),
                    new SqlParameter("@MachineBranch", obj.MachineBranch),
                    new SqlParameter("@MachineWastage", obj.MachineWastage)
                };

                return(Execute.RunSP_RowsEffected(Connection, "SPADD_Machine", paramList));
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message, ex);
            }
        }
Beispiel #14
0
        public int Update(MTN obj, long OriginalMTNNO)
        {
            try
            {
                SqlParameter[] paramList = new SqlParameter[] {
                    new SqlParameter("@MTNBatchID", obj.MTNBatch),
                    new SqlParameter("@MTNDate", obj.MTNDate),
                    new SqlParameter("@MTNApprovedBy", obj.MTNApprovedBy.EmployeeID),
                    new SqlParameter("@MTNApproveDate", obj.MTNApprovedDate),
                    new SqlParameter("@MTNEnterdBy", obj.MTNEnterdBy.EmployeeID),
                    new SqlParameter("@MTNFromDepID", obj.MTNDepartmentFrom.DepID),
                    new SqlParameter("@MTNToDepID", obj.MTNDepartmentTo.DepID),
                    new SqlParameter("@MTNReceivedBy", obj.MTNReceivedBy.EmployeeID),
                    new SqlParameter("@MTNReceivedDate", obj.MTNReceivedDate),
                    new SqlParameter("@MTNStatus", obj.MTNStatus),
                    new SqlParameter("@MTNType", obj.MTNType),
                    new SqlParameter("@MTNItemType", obj.MTNItemType),
                    new SqlParameter("@MTNStore", obj.MTNStore.StoreID),
                    new SqlParameter("@Original_MTNNO", OriginalMTNNO)
                };

                return(Execute.RunSP_RowsEffected(Connection, "SPADD_MR", paramList));
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message, ex);
            }
        }
Beispiel #15
0
        public long Add(PRPDBatchQTR obj)
        {
            try
            {
                SqlParameter[] paramList = new SqlParameter[] {
                    new SqlParameter("@PRPDBatchID", obj.PRPDBatchID),
                    new SqlParameter("@SandContent", obj.SandContent),
                    new SqlParameter("@ForiegnMatter", obj.ForiegnMatter),
                    new SqlParameter("@MoistureContent", obj.MoistureContent),
                    new SqlParameter("@AnalyzedBy", obj.AnalyzedBy),
                    new SqlParameter("@RDQAOfficer", obj.RDQAOfficer),
                    new SqlParameter("@Date", obj.Date),
                    new SqlParameter("@SampleSize", obj.SampleSize),
                    new SqlParameter("@Acceptance", obj.Acceptance),
                    new SqlParameter("@SandContentState", obj.SandContentState),
                    new SqlParameter("@ForiegnMatterState", obj.ForiegnMatterState),
                    new SqlParameter("@MoistureContentState", obj.MoistureContentState),
                    new SqlParameter("@Remarks", obj.Remarks),
                    new SqlParameter("@Status", obj.Status)
                };

                return(Execute.RunSP_RowsEffected(Connection, "SPADD_PRPDBatchQTR", paramList));
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message, ex);
            }
        }
Beispiel #16
0
        public long Add(PRPDCAP obj)
        {
            try
            {
                SqlParameter[] paramList = new SqlParameter[] {
                    new SqlParameter("@PRPDCAPID", obj.PRPDCAPID),
                    new SqlParameter("@CAPMaterial", obj.MaterialCode),
                    new SqlParameter("@GRNNO", obj.GRNNO),
                    new SqlParameter("@CAPQty", obj.CAPQty),
                    new SqlParameter("@Instructions", obj.Instructions),
                    new SqlParameter("@ReworkQty", obj.ReworkQty),
                    new SqlParameter("@DisposeQty", obj.DisposeQty),
                    new SqlParameter("@AcceptQty", obj.AcceptQty),
                    new SqlParameter("@Remarks", obj.Remarks),
                    new SqlParameter("@EnterdBy", obj.EnteredBy.EmployeeID),
                    new SqlParameter("@EnterdDate", obj.EnteredDate),
                    new SqlParameter("@ApprovedBy", obj.ApprovedBy.EmployeeID),
                    new SqlParameter("@ApprovedDate", obj.ApprovedDate),
                    new SqlParameter("@TestedBy", obj.TestedBy.EmployeeID),
                    new SqlParameter("@TestDate", obj.TestedDate),
                    new SqlParameter("@CAPStatus", obj.Status),
                    new SqlParameter("@ReworkMTN", obj.ReworkMTN),
                    new SqlParameter("@DisposeMTN", obj.DisposeMTN)
                };

                return(Execute.RunSP_RowsEffected(Connection, "SPADD_PRPDCAP", paramList));
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message, ex);
            }
        }
Beispiel #17
0
        public int Update(MR obj)
        {
            try
            {
                SqlParameter[] paramList = new SqlParameter[] {
                    new SqlParameter("@MRStore", obj.MRStore.StoreID),
                    new SqlParameter("@MRDate", obj.MRDate),
                    new SqlParameter("@MRApprovedBy", obj.MRApprovedBy),
                    new SqlParameter("@MRApproveDate", obj.MRApprovedDate),
                    new SqlParameter("@MREnterdBy", obj.MREnterdBy),
                    new SqlParameter("@MRFromDepId", obj.MRDepartmentFrom.DepID),
                    new SqlParameter("@MRIssuedBy", obj.MRIssuedBy),
                    new SqlParameter("@MRIssuedDate", obj.MRIssuedDate),
                    new SqlParameter("@MRReceivedBy", obj.MRReceivedBy),
                    new SqlParameter("@MRReceivedDate", obj.MRReceivedDate),
                    new SqlParameter("@MRRemarks", obj.MRRemarks),
                    new SqlParameter("@MRStatus", obj.MRStatus),
                    new SqlParameter("@MRType", obj.MRType),
                    new SqlParameter("@Original_MRNO", obj.MRNO)
                };

                return(Execute.RunSP_RowsEffected(Connection, "SPUPDATE_MR", paramList));
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message, ex);
            }
        }
Beispiel #18
0
        public long Add(ProjectMaterials Obj)
        {
            try
            {
                SqlParameter[] paramList = new SqlParameter[] {
                    new SqlParameter("@ProjectID", Obj.ProjectID),
                    new SqlParameter("@ItemCode", Obj.MaterialID),
                    new SqlParameter("@UsedQty", Obj.UsedQty),
                    new SqlParameter("@DamagedQty", Obj.DamagedQty),
                    new SqlParameter("@UnitPrice", Obj.UnitPrice),
                    new SqlParameter("@EnteredBy", Obj.EnteredBy),
                    new SqlParameter("@ItemTypeName", Obj.ItemTypeName),
                    new SqlParameter("@outParam", SqlDbType.Int, 120)
                    {
                        Direction = ParameterDirection.Output
                    }
                };

                return(Execute.RunSP_RowsEffected(Connection, "SPADD_ProjectMaterials", paramList));
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message, ex);
            }
        }
Beispiel #19
0
        public int Update(Material obj, String OriginalCode)
        {
            try
            {
                SqlParameter[] paramList = new SqlParameter[] {
                    new SqlParameter("@MaterialCode", obj.MaterialCode),
                    new SqlParameter("@MaterialDescription", obj.MaterialDescription),
                    new SqlParameter("@MatMainType", obj.MaterialMainType),
                    new SqlParameter("@MatTypeID", obj.MateialType.MatType),
                    new SqlParameter("@ItemFormID", obj.MatForm.FormID),
                    new SqlParameter("@UnitID", obj.MatUnit.UnitID),
                    new SqlParameter("@AVGCost", obj.MatCost),
                    new SqlParameter("@Seasanal", obj.IsSeasanal),
                    new SqlParameter("@Local", obj.IsLocal),
                    new SqlParameter("@Export", obj.IsExport),
                    new SqlParameter("@SeasanFrom", obj.MatSeasonFrom),
                    new SqlParameter("@SeasanTo", obj.MatSeasonTo),
                    new SqlParameter("@BasicMaterialCode", obj.MatBasicMaterial),
                    new SqlParameter("@BasicQty", obj.MatBasicQty),
                    new SqlParameter("@ParticalSize", obj.MatParticleSize),
                    new SqlParameter("@Status", obj.MaterialStatus),
                    new SqlParameter("@MaterialType", obj.MaterialType),
                    new SqlParameter("@MatCatID", obj.MaterialCategory),
                    new SqlParameter("@Original_MaterialCode", OriginalCode)
                };

                return(Execute.RunSP_RowsEffected(Connection, "SPUPDATE_Material", paramList));
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message, ex);
            }
        }
Beispiel #20
0
        public int Update(FinishProduct objFinishProduct, String OriginalCode)
        {
            try
            {
                if (objFinishProduct.FinishProductFormula == null)
                {
                    SqlParameter[] paramList = new SqlParameter[] {
                        new SqlParameter("@FinishProductCode", objFinishProduct.FinishProductCode),
                        new SqlParameter("@BasicProductCode", objFinishProduct.BasicProduct.BasicProductCode),
                        new SqlParameter("@FinishProdutFormulaID", null),
                        new SqlParameter("@FinishProdutPackingTypeID", objFinishProduct.FinishProductPackingType.PackingID),
                        new SqlParameter("@FinishProdutDescription", objFinishProduct.FinishProductDescription),
                        new SqlParameter("@FinishProdutBasicQty", objFinishProduct.BasicProductQty),
                        new SqlParameter("@FinishProdutAvgCost", objFinishProduct.FinishProductAvgCost),
                        new SqlParameter("@FinishProdutStatus", objFinishProduct.FinishProductStatus),
                        new SqlParameter("@PrimaryFinishProductCode", objFinishProduct.FinishProductCode),
                        new SqlParameter("@PrimaryFinishProductQty", objFinishProduct.PrimaryFinishProductQty),
                        new SqlParameter("@FinishProductType", objFinishProduct.FinishProductType),
                        new SqlParameter("@SKUID", objFinishProduct.SKUID),
                        new SqlParameter("@Original_FinishProductCode", OriginalCode)
                    };

                    return(Execute.RunSP_RowsEffected(Connection, "SPUPDATE_FinishProduct", paramList));
                }

                else
                {
                    SqlParameter[] paramList = new SqlParameter[] {
                        new SqlParameter("@FinishProdutCode", objFinishProduct.FinishProductCode),
                        new SqlParameter("@BasicProductCode", objFinishProduct.BasicProduct.BasicProductCode),
                        new SqlParameter("@FinishProdutFormulaID", objFinishProduct.FinishProductFormula.FormulaID),
                        new SqlParameter("@FinishProdutPackingTypeID", objFinishProduct.FinishProductPackingType.PackingID),
                        new SqlParameter("@FinishProdutDescription", objFinishProduct.FinishProductDescription),
                        new SqlParameter("@FinishProdutBasicQty", objFinishProduct.BasicProductQty),
                        new SqlParameter("@FinishProdutAvgCost", objFinishProduct.FinishProductAvgCost),
                        new SqlParameter("@FinishProdutStatus", objFinishProduct.FinishProductStatus),
                        new SqlParameter("@PrimaryFinishProductCode", objFinishProduct.FinishProductCode),
                        new SqlParameter("@PrimaryFinishProductQty", objFinishProduct.PrimaryFinishProductQty),
                        new SqlParameter("@FinishProductType", objFinishProduct.FinishProductType),
                        new SqlParameter("@SKUID", objFinishProduct.SKUID),
                        new SqlParameter("@Original_FinishProductCode", OriginalCode)
                    };

                    return(Execute.RunSP_RowsEffected(Connection, "SPUPDATE_FinishProduct", paramList));
                }
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message, ex);
            }
        }
Beispiel #21
0
        public int Delete(String FinishProductCode)
        {
            try
            {
                SqlParameter[] paramList = new SqlParameter[] {
                    new SqlParameter("@Original_FinishProductCode", FinishProductCode)
                };

                return(Execute.RunSP_RowsEffected(Connection, "SPDELETE_FinishProduct", paramList));
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message, ex);
            }
        }
Beispiel #22
0
        public int Delete(String ProductSubCategoryID)
        {
            try
            {
                SqlParameter[] paramList = new SqlParameter[] {
                    new SqlParameter("@Original_ProductSubCatID", ProductSubCategoryID)
                };

                return(Execute.RunSP_RowsEffected(Connection, "SPDELETE_ProductSubCategory", paramList));
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message, ex);
            }
        }
Beispiel #23
0
        public int Delete(long ID)
        {
            try
            {
                SqlParameter[] paramList = new SqlParameter[] {
                    new SqlParameter("@Original_RPDPackDetails", ID)
                };

                return(Execute.RunSP_RowsEffected(Connection, "SPDELETE_RPDBatchActPackingDetails", paramList));
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message, ex);
            }
        }
        public int GetNotFinishedCount(long BatchActivityDetailsID)
        {
            try
            {
                SqlParameter[] paramList = new SqlParameter[] {
                    new SqlParameter("@BatchActID", BatchActivityDetailsID)
                };

                return(Execute.RunSP_RowsEffected(Connection, "SPGET_RPDActivityDetailsMachine_Count_NotFinished", paramList));
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message, ex);
            }
        }
Beispiel #25
0
        public int Delete(long UserAccesRolesID)
        {
            try
            {
                SqlParameter[] paramList = new SqlParameter[] {
                    new SqlParameter("@Original_UserRoleID", UserAccesRolesID)
                };

                return(Execute.RunSP_RowsEffected(Connection, "SPDELETE_Unit", paramList));
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message, ex);
            }
        }
Beispiel #26
0
        public int Delete(long GRNNO)
        {
            try
            {
                SqlParameter[] paramList = new SqlParameter[] {
                    new SqlParameter("@Original_GRNNO", GRNNO)
                };

                return(Execute.RunSP_RowsEffected(Connection, "SPDELETE_GRN", paramList));
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message, ex);
            }
        }
Beispiel #27
0
        public int Update(PRPDCAP obj, long Original_PRPDCAPID)
        {
            try
            {
                SqlParameter[] paramList = new SqlParameter[] {
                    new SqlParameter("@Original_PRPDCAPID", Original_PRPDCAPID)
                };

                return(Execute.RunSP_RowsEffected(Connection, "SPUPDATE_PRPDCAP", paramList));
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message, ex);
            }
        }
Beispiel #28
0
        public int Add(MachineType obj)
        {
            try
            {
                SqlParameter[] paramList = new SqlParameter[] {
                    new SqlParameter("@MachineType", obj.MachineTypeTitle)
                };

                return(Execute.RunSP_RowsEffected(Connection, "SPADD_MachineType", paramList));
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message, ex);
            }
        }
Beispiel #29
0
        public int Delete(long MachineTypeID)
        {
            try
            {
                SqlParameter[] paramList = new SqlParameter[] {
                    new SqlParameter("@Original_MachineTypeID", MachineTypeID)
                };

                return(Execute.RunSP_RowsEffected(Connection, "SPDELETE_MachineType", paramList));
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message, ex);
            }
        }
        public int Delete(long ID)
        {
            try
            {
                SqlParameter[] paramList = new SqlParameter[] {
                    new SqlParameter("@ID", ID)
                };

                return(Execute.RunSP_RowsEffected(Connection, "SPDELETE_DeliverNoteMaterials", paramList));
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message, ex);
            }
        }