public int Add_BatchMR(string Part, string BatchID, string StoreID, string RequestedBy, string Remarks, MR.Status MRStatus, MR.Type MRType, int OriginType) { try { SqlParameter[] paramList = new SqlParameter[] { new SqlParameter("@Part", Part), new SqlParameter("@BatchID", BatchID), new SqlParameter("@MRStore", StoreID), new SqlParameter("@MREnterdBy", RequestedBy), new SqlParameter("@MRRemarks", Remarks), new SqlParameter("@MRStatus", MRStatus), new SqlParameter("@MRType", MRType), new SqlParameter("@OriginType", OriginType), new SqlParameter("@outParam", SqlDbType.Int) { Direction = ParameterDirection.Output } }; return(Execute.RunSP_Output(Connection, "SPADD_BatchMR_SendMR", paramList)); } catch (Exception ex) { throw new Exception(ex.Message, ex); } }
public long Add_M(MR obj) { try { SqlParameter[] paramList = new SqlParameter[] { new SqlParameter("@MRStore", obj.MRStore.StoreID), new SqlParameter("@MREnterdBy", obj.MREnterdBy), new SqlParameter("@MRFromDepId", obj.MRDepartmentFrom.DepID), new SqlParameter("@MRRemarks", obj.MRRemarks), new SqlParameter("@MRStatus", obj.MRStatus), new SqlParameter("@MRType", obj.MRType), new SqlParameter("@OriginType", obj.OriginType), new SqlParameter("@outParam", SqlDbType.Int) { Direction = ParameterDirection.Output } }; return(Execute.RunSP_Output(Connection, "SPADD_MR_M", paramList)); } catch (Exception ex) { throw new Exception(ex.Message, ex); } }
public long Add(RPDActivityDetailsLabour obj) { try { SqlParameter[] paramList = new SqlParameter[] { new SqlParameter("@ActivityDetailsLabourID", obj.ActivityDetailsLabourID), new SqlParameter("@BatchActID", obj.BatchActID), new SqlParameter("@Description", obj.Description), new SqlParameter("@Helper", obj.Helper), new SqlParameter("@StartTime", obj.StartTime), new SqlParameter("@StopTime", obj.StopTime), new SqlParameter("@OTHours", obj.OTHours), new SqlParameter("@outParam", SqlDbType.Int) { Direction = ParameterDirection.Output } }; return(Execute.RunSP_Output(Connection, "SPADD_RPDActivityDetailsLabour_Update", paramList)); } catch (Exception ex) { throw new Exception(ex.Message, ex); } }
public int CreatePackingMTN_Secondary_toStores(MTN obj, BatchActivity.Status Status, string FinishProductCode, int Qty, BatchActivity.Status BatchActStatus_Finished, BatchActivity.Status BatchActStatus_Secondary) { try { SqlParameter[] paramList = new SqlParameter[] { new SqlParameter("@MTNPackingBatch", obj.PackingBatch), new SqlParameter("@MTNEnterdBy", obj.MTNEnterdBy.EmployeeID), new SqlParameter("@MTNToDepID", obj.MTNDepartmentTo.DepID), new SqlParameter("@MTNStatus", obj.MTNStatus), new SqlParameter("@MTNType", obj.MTNType), new SqlParameter("@MTNItemType", obj.MTNItemType), new SqlParameter("@FinishProductCode", FinishProductCode), new SqlParameter("@Qty", Qty), new SqlParameter("@NextBatchActivityStatus", Convert.ToInt32(Status)), new SqlParameter("@BatchActStatus_Finished", Convert.ToInt32(BatchActStatus_Finished)), new SqlParameter("@BatchActStatus_Secondary", Convert.ToInt32(BatchActStatus_Secondary)), new SqlParameter("@outParam", SqlDbType.Int) { Direction = ParameterDirection.Output } }; return(Execute.RunSP_Output(Connection, "SPADD_MTN_Packing_Secondary", paramList)); } catch (Exception ex) { throw new Exception(ex.Message, ex); } }
public int Add_Packing_ToSections(string StoreID, int SectionID, int DepID, string RequestedBy, string Remarks, MR.Status MRStatus, MR.Type MRType, int OriginType) { try { SqlParameter[] paramList = new SqlParameter[] { new SqlParameter("@MRStore", StoreID), new SqlParameter("@SectionID", SectionID), new SqlParameter("@DepID", DepID), new SqlParameter("@MREnterdBy", RequestedBy), new SqlParameter("@MRRemarks", Remarks), new SqlParameter("@MRStatus", MRStatus), new SqlParameter("@MRType", MRType), new SqlParameter("@OriginType", OriginType), new SqlParameter("@outParam", SqlDbType.Int) { Direction = ParameterDirection.Output } }; return(Execute.RunSP_Output(Connection, "SPADD_MR_Packing_ToSections", paramList)); } catch (Exception ex) { throw new Exception(ex.Message, ex); } }
public long Add(SalesForecast obj) { try { SqlParameter SFNO = new SqlParameter(); SFNO.Direction = ParameterDirection.Output; SqlParameter[] paramList = new SqlParameter[] { new SqlParameter("@RevisionNo", obj.RevisionNo), new SqlParameter("@Year", obj.Year), new SqlParameter("@Month", obj.Month), new SqlParameter("@WeekID", obj.WeekID), new SqlParameter("@Accuracy", obj.Accuracy), new SqlParameter("@State", obj.State), new SqlParameter("@EenteredBy", obj.EenteredBy), new SqlParameter("@ProductCategory", obj.ProductCategory), new SqlParameter("@outParam", SqlDbType.Int, 120) { Direction = ParameterDirection.Output } }; return(Execute.RunSP_Output(Connection, "SPADD_SalesForecast", paramList)); } catch (Exception ex) { throw new Exception(ex.Message, ex); } }
public int Update(Activity obj) { try { SqlParameter[] paramList = new SqlParameter[] { new SqlParameter("@ActMainActID", obj.ActMainActivity.MainActID), new SqlParameter("@ActBatchID", obj.ActSTDBatch.STDBatchID), new SqlParameter("@ActDuration", obj.ActDuration), new SqlParameter("@ActManHours", obj.ActManHours), new SqlParameter("@ActCost", obj.ActCost), new SqlParameter("@ActID", obj.ActivityID), new SqlParameter("@SequenceNo", obj.SequenceNo), new SqlParameter("@Part", obj.Part), new SqlParameter("@InstructedBy", obj.InstructedBy), new SqlParameter("@LastEdited", obj.LastEdited), new SqlParameter("@BlockNextActivity", obj.BlockNextActivity) }; return(Execute.RunSP_Output(Connection, "SPUPDATE_Activity", paramList)); } catch (Exception ex) { throw new Exception(ex.Message, ex); } }
public int Add_Direct_TGRN(GRN obj, string DeliverNote, string DeliverPONO) { try { SqlParameter GRNNO = new SqlParameter(); GRNNO.Direction = ParameterDirection.Output; SqlParameter[] paramList = new SqlParameter[] { new SqlParameter("@GRNEnterdBy", obj.GRNEnterdBy), new SqlParameter("@GRNStoreID", obj.GRNStore.StoreID), new SqlParameter("@GRNType", obj.GRNType), new SqlParameter("@GRNStatus", obj.GRNStatus), new SqlParameter("@GRNCategory", obj.GRNCategory), new SqlParameter("@DeliverNoteID", DeliverNote), new SqlParameter("@DeliverPONO", DeliverPONO), new SqlParameter("@outParam", SqlDbType.Int) { Direction = ParameterDirection.Output } }; return(Execute.RunSP_Output(Connection, "SPADD_GRN_Direct_TGRN", paramList)); } catch (Exception ex) { throw new Exception(ex.Message, ex); } }
public long Add(Activity obj) { try { SqlParameter[] paramList = new SqlParameter[] { new SqlParameter("@ActMainActID", obj.ActMainActivity.MainActID), new SqlParameter("@ActBatchID", obj.ActSTDBatch.STDBatchID), new SqlParameter("@ActDuration", obj.ActDuration), new SqlParameter("@ActManHours", obj.ActManHours), new SqlParameter("@ActCost", obj.ActCost), new SqlParameter("@SequenceNo", obj.SequenceNo), new SqlParameter("@Part", obj.Part), new SqlParameter("@InstructedBy", obj.InstructedBy), new SqlParameter("@BlockNextActivity", obj.BlockNextActivity), new SqlParameter("@outParam", SqlDbType.Int, 120) { Direction = ParameterDirection.Output } }; return(Execute.RunSP_Output(Connection, "SPADD_Activity", paramList)); } catch (Exception ex) { throw new Exception(ex.Message, ex); } }
public bool IsRPDBatchAccept(String RPDBatchID, int Status) { SqlParameter[] paramList = new SqlParameter[] { new SqlParameter("@RPDBatchID", RPDBatchID), new SqlParameter("@Status", Status), new SqlParameter("@outParam", SqlDbType.Int) { Direction = ParameterDirection.Output } }; try { int x = Execute.RunSP_Output(Connection, "SPGET_QCReport_Count_By_RPD", paramList); if (x > 0) { return(true); } return(false); } catch (Exception ex) { throw new Exception(ex.Message, ex); return(false); } }
public int CreateBasicProductTransfer_Basic_toRPD(MTN obj, string BasicProductCode, decimal BasicQty, MTN.Status MTNRejectStatus, Batch.Status BatchStatusTransferred) { try { SqlParameter[] paramList = new SqlParameter[] { new SqlParameter("@MTNBatchID", obj.MTNBatch), new SqlParameter("@MTNEnterdBy", obj.MTNEnterdBy.EmployeeID), new SqlParameter("@MTNToDepID", obj.MTNDepartmentTo.DepID), new SqlParameter("@MTNStatus", obj.MTNStatus), new SqlParameter("@MTNType", obj.MTNType), new SqlParameter("@MTNItemType", obj.MTNItemType), new SqlParameter("@BasicProductCode", BasicProductCode), new SqlParameter("@Qty", BasicQty), new SqlParameter("@MTNStatus_Reject", (int)MTNRejectStatus), new SqlParameter("@BatchStatus_Transferred", (int)BatchStatusTransferred), new SqlParameter("@outParam", SqlDbType.Int) { Direction = ParameterDirection.Output } }; return(Execute.RunSP_Output(Connection, "SPADD_MTN_BasicProductTransfer_Basic", paramList)); } catch (Exception ex) { throw new Exception(ex.Message, ex); } }
public bool IsPRPDBatchAccept(String PRPDBatchID, int Status) { try { SqlParameter[] paramList = new SqlParameter[] { new SqlParameter("@PRPDBatchID", PRPDBatchID), new SqlParameter("@Status", Status), new SqlParameter("@outParam", SqlDbType.Int) { Direction = ParameterDirection.Output } }; int x = Execute.RunSP_Output(Connection, "SPGET_QCReport_Count_By_PRPD", paramList); if (x > 0) { return(true); } return(false); } catch (SqlException sqlex) { throw sqlex; } catch (Exception ex) { throw ex; } }
public long Add_FinishedGoodsReturns(MTN obj) { try { SqlParameter[] paramList = new SqlParameter[] { new SqlParameter("@MTNEnterdBy", obj.MTNEnterdBy.EmployeeID), new SqlParameter("@MTNFromDepID", obj.MTNDepartmentFrom.DepID), new SqlParameter("@MTNToDepID", obj.MTNDepartmentTo.DepID), new SqlParameter("@MTNStatus", obj.MTNStatus), new SqlParameter("@MTNType", obj.MTNType), new SqlParameter("@MTNItemType", obj.MTNItemType), new SqlParameter("@Store", obj.MTNStore.StoreID), new SqlParameter("@outParam", SqlDbType.Int) { Direction = ParameterDirection.Output } }; return(Execute.RunSP_Output(Connection, "SPADD_MTN_FinishedGoodsReturns", paramList)); } catch (Exception ex) { throw new Exception(ex.Message, ex); } }
public long Add_Packing_Rework(string BatchID, int BatchStatus, string StartProductCode, string EndProductCode, decimal PackingQty, string ChangedBy, string ActMethod) { try { SqlParameter[] paramList = new SqlParameter[] { new SqlParameter("@BatchID", BatchID), new SqlParameter("@BatchStatus", BatchStatus), new SqlParameter("@StartProductCode", StartProductCode), new SqlParameter("@EndProductCode", EndProductCode), new SqlParameter("@PackingQty", PackingQty), new SqlParameter("@ChangedBy", ChangedBy), new SqlParameter("@ActMethod", ActMethod), new SqlParameter("@outParam", SqlDbType.Int) { Direction = ParameterDirection.Output } }; return(Execute.RunSP_Output(Connection, "SPADD_BatchActivity_Rework", paramList)); } catch (Exception ex) { throw new Exception(ex.Message, ex); } }
public int GetPlan_Availability(String PlanType, int Year1, string Month1, int Year2, string Month2, int Year3, string Month3) { try { SqlParameter[] paramList = new SqlParameter[] { new SqlParameter("@Type", PlanType), new SqlParameter("@Year1", Year1), new SqlParameter("@Month1", Month1), new SqlParameter("@Year2", Year2), new SqlParameter("@Month2", Month2), new SqlParameter("@Year3", Year3), new SqlParameter("@Month3", Month3), new SqlParameter("@outParam", SqlDbType.Int) { Direction = ParameterDirection.Output } }; return(Execute.RunSP_Output(Connection, "SPGET_PlanMaterial_Availability", paramList)); } catch (Exception ex) { throw new Exception(ex.Message, ex); } }
public int GetNotFinishedCount(long ActivityID) { try { SqlParameter[] paramList = new SqlParameter[] { new SqlParameter("@BatchActID", ActivityID) }; return(Execute.RunSP_Output(Connection, "SPGET_PRPDActivityDetailsMachine_Count_NotFinished", paramList)); } catch (Exception ex) { throw new Exception(ex.Message, ex); } }
public int Delete(long ActID, String MachineCode) { try { SqlParameter[] paramList = new SqlParameter[] { new SqlParameter("@Original_ActID", ActID), new SqlParameter("@Original_MachineID", MachineCode) }; return(Execute.RunSP_Output(Connection, "SPDELETE_ActivityMachine", paramList)); } catch (Exception ex) { throw new Exception(ex.Message, ex); } }
public int Add(ActivityMachine obj) { try { SqlParameter[] paramList = new SqlParameter[] { new SqlParameter("@ActID", obj.Activity.ActivityID), new SqlParameter("@MachineID", obj.Machine.MachineCode), new SqlParameter("@EstimatedHours", obj.EstimatedHour) }; return(Execute.RunSP_Output(Connection, "SPADD_ActivityMachine", paramList)); } catch (Exception ex) { throw new Exception(ex.Message, ex); } }
public int GetBy_BatchActivity_Count(string PRPDBatchID, long ActID, PRPDBatchActivity.ActStatus ActStatus) { try { SqlParameter[] paramList = new SqlParameter[] { new SqlParameter("@ActStatus", ActStatus), new SqlParameter("@ActID", ActID), new SqlParameter("@PRPDBatchID", PRPDBatchID), }; return(Execute.RunSP_Output(Connection, "SPGET_PRPDBatchActivityByActStatus_Count", paramList)); } catch (Exception ex) { throw new Exception(ex.Message, ex); } }
public int Delete(Activity obj) { try { SqlParameter[] paramList = new SqlParameter[] { new SqlParameter("@ActivityID", obj.ActivityID), new SqlParameter("@outParam", SqlDbType.Int, 120) { Direction = ParameterDirection.Output } }; return(Execute.RunSP_Output(Connection, "SPDELETE_ActivityDetails", paramList)); } catch (Exception ex) { throw new Exception(ex.Message, ex); } }
public int CheckForPasswordExpiry(User obj) { try { SqlParameter[] paramList = new SqlParameter[] { new SqlParameter("@UserID", obj.UserID), new SqlParameter("@outParam", SqlDbType.Int) { Direction = ParameterDirection.Output } }; return(Execute.RunSP_Output(Connection, "SPGET_User_PsswordExpired", paramList)); } catch (Exception ex) { throw new Exception(ex.Message, ex); } }
public int GetNotFinishedCount(int BatchActID) { try { SqlParameter[] paramList = new SqlParameter[] { new SqlParameter("@PRPDBatchBatchActID", BatchActID), new SqlParameter("@outParam", SqlDbType.Int) { Direction = ParameterDirection.Output } }; return(Execute.RunSP_Output(Connection, "SPGET_PRPDBatchActivity_Count_By_Status", paramList)); } catch (Exception ex) { throw new Exception(ex.Message, ex); } }
public int Get_NotWeighingChecked_Count(string BatchID) { try { SqlParameter[] paramList = new SqlParameter[] { new SqlParameter("@BatchID", BatchID), new SqlParameter("@outParam", SqlDbType.Int) { Direction = ParameterDirection.Output } }; return(Execute.RunSP_Output(Connection, "SPGET_BatchFormulaMaterial_IsWeighingChecked", paramList)); } catch (Exception ex) { throw new Exception(ex.Message, ex); } }
public int ActivityCount(String PRPDBatchID, PRPDBatchActivity.ActStatus Status) { try { SqlParameter[] paramList = new SqlParameter[] { new SqlParameter("@PRPDBatchID", PRPDBatchID), new SqlParameter("@ActStatus", Status), new SqlParameter("@outParam", SqlDbType.Int) { Direction = ParameterDirection.Output } }; return(Execute.RunSP_Output(Connection, "SPGET_PRPDBatchActivity_Count_By_BatchID", paramList)); } catch (Exception ex) { throw new Exception(ex.Message, ex); } }
public int Add_FG(Formula objFormula) { try { SqlParameter[] paramList = new SqlParameter[] { new SqlParameter("@FormulaQty", objFormula.FormulaQty), new SqlParameter("@FormulaInstructedBy", objFormula.FormulaInstructedBy.EmployeeID), new SqlParameter("@outParam", SqlDbType.Int) { Direction = ParameterDirection.Output } }; return(Execute.RunSP_Output(Connection, "SPADD_Formula_FG", paramList)); } catch (Exception ex) { throw new Exception(ex.Message, ex); } }
public int GetMaterialRequisitionStatus_ByPart(String BatchID, string Part) { try { SqlParameter[] paramList = new SqlParameter[] { new SqlParameter("@BatchID", BatchID), new SqlParameter("@PartID", Part), new SqlParameter("@outParam", SqlDbType.Int) { Direction = ParameterDirection.Output } }; return(Execute.RunSP_Output(Connection, "SPGET_BatchByMaterialRequisitionState", paramList)); } catch (Exception ex) { throw new Exception(ex.Message, ex); } }
public long Add(RPDActivityDetailsMachine obj) { try { SqlParameter[] paramList = new SqlParameter[] { new SqlParameter("@BatchActID", obj.BatchActID), new SqlParameter("@Description", obj.Description), new SqlParameter("@MachineCode", obj.MachineCode), new SqlParameter("@MeshSize", obj.MeshSize), new SqlParameter("@StartTime", obj.StartTime), new SqlParameter("@StopTime", obj.StopTime), new SqlParameter("@outParam", obj.ActivityDetailsMachineID) }; return(Execute.RunSP_Output(Connection, "SPADD_RPDActivityDetailsMachine", paramList)); } catch (Exception ex) { throw new Exception(ex.Message, ex); } }
public long Add(UserRole obj) { try { SqlParameter[] paramList = new SqlParameter[] { new SqlParameter("@UserRoleID", obj.UserRoleID), new SqlParameter("@UserRole", obj.UserRoleName), new SqlParameter("@Edit", obj.Edit), new SqlParameter("@Remove", obj.Remove), new SqlParameter("@outParam", SqlDbType.Int) { Direction = ParameterDirection.Output } }; return(Execute.RunSP_Output(Connection, "SPADD_UserRole", paramList)); } catch (Exception ex) { throw new Exception(ex.Message, ex); } }
public long Add(BatchActivityMachineDetails obj) { try { SqlParameter[] paramList = new SqlParameter[] { new SqlParameter("@BatchID", obj.BatchID), new SqlParameter("@MachineID", obj.MachineID), new SqlParameter("@InputQty", obj.InputQty), new SqlParameter("@OutputQty", obj.OutputQty), new SqlParameter("@RejectedQty", obj.RejectedQty), new SqlParameter("@outParam", SqlDbType.Int) { Direction = ParameterDirection.Output } }; return(Execute.RunSP_Output(Connection, "SPADD_BatchActivityMachineDetails", paramList)); } catch (Exception ex) { throw new Exception(ex.Message, ex); } }
public long Add(RPDBatchActPackingDetails obj) { try { SqlParameter[] paramList = new SqlParameter[] { new SqlParameter("@RPDPackDetails", obj.RPDPackDetails), new SqlParameter("@RPDBatchActID", obj.RPDBatchActID), new SqlParameter("@MaterialCode", obj.MaterialCode), new SqlParameter("@NoOfPackets", obj.NoOfPackets), new SqlParameter("@PackSize", obj.PackSize), new SqlParameter("@outParam", SqlDbType.Int) { Direction = ParameterDirection.Output } }; return(Execute.RunSP_Output(Connection, "SPADD_RPDBatchActPackingDetails_Update", paramList)); } catch (Exception ex) { throw new Exception(ex.Message, ex); } }