Beispiel #1
0
        //---------------------ADD REGION------------------------------

        public String Add(Batch objBatch, String Prefix, bool Isprefix)
        {
            try
            {
                SqlParameter[] paramList = new SqlParameter[] {
                    new SqlParameter("@BatchSTDBatchID", objBatch.StandardBatch.STDBatchID),
                    new SqlParameter("@BatchGeneratedBy", objBatch.BatchGenerateBy.EmployeeID),
                    new SqlParameter("@BatchDivideCount", objBatch.BatchDivideCount),
                    new SqlParameter("@BatchStatus", objBatch.BatchStatus),
                    new SqlParameter("@BatchType", objBatch.BatchType),
                    new SqlParameter("@Prefix", Prefix),
                    new SqlParameter("@IsPrefix", Isprefix),
                    new SqlParameter("@NewBatchSize", objBatch.BatchSize),
                    new SqlParameter("@outParam", SqlDbType.VarChar, 50)
                    {
                        Direction = ParameterDirection.Output
                    }
                };

                return(Execute.RunSP_Output_String(Connection, "SPADD_Batch_STD", paramList));
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message, ex);
            }
        }
Beispiel #2
0
        public String AddPP(PRPDBatch obj)
        {
            try
            {
                SqlParameter[] paramList = new SqlParameter[] {
                    new SqlParameter("@PRPDBatchMaterialCode", obj.PRPDBatchMaterial.MaterialCode),
                    new SqlParameter("@PRPDBatchQty", obj.PRPDBatchQty),
                    new SqlParameter("@PRPDBatchInstructedBy", obj.PRPDBatchInstructedBy.EmployeeID),
                    new SqlParameter("@PRPDBatchInstructedDate", obj.PRPDBatchInstructedDate),
                    new SqlParameter("@PRPDBatchStatus", (int)obj.Status),
                    new SqlParameter("@MRIN", obj.MRIN),
                    new SqlParameter("@Comments", obj.PRPDBatchComments),
                    new SqlParameter("@BatchType", (int)obj.Type),
                    new SqlParameter("@outParam", SqlDbType.VarChar, 50)
                    {
                        Direction = ParameterDirection.Output
                    }
                };

                return(Execute.RunSP_Output_String(Connection, "SPADD_PRPDBatch_Initial_PROrPP", paramList));
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message, ex);
            }
        }
Beispiel #3
0
        public string Add_Basic(STDBatch obj)
        {
            try
            {
                SqlParameter[] paramList = new SqlParameter[] {
                    new SqlParameter("@STDBatchDescription", obj.STDBatchDescription),
                    new SqlParameter("@STDBasicProductCode", obj.STDBatchBasicProduct.BasicProductCode),
                    new SqlParameter("@STDBatchSize", obj.STDBatchSize),
                    new SqlParameter("@STDInstructedBy", obj.STDBatchInstructedBy.EmployeeID),
                    new SqlParameter("@STDBatchType", obj.STDBatchType),
                    new SqlParameter("@STDDuration", obj.STDDuration),
                    new SqlParameter("@EditableBatch", obj.EditableBatch),
                    new SqlParameter("@LabourHours", obj.LabourHours),
                    new SqlParameter("@MachineHours", obj.MachineHours),
                    new SqlParameter("@OutputQty", obj.OutputQty),
                    new SqlParameter("@InputQty", obj.InputQty),
                    new SqlParameter("@SpecificGravity", obj.SpecificGravity),
                    new SqlParameter("@Water", obj.Water),
                    new SqlParameter("@outParam", SqlDbType.VarChar, 50)
                    {
                        Direction = ParameterDirection.Output
                    }
                };

                return(Execute.RunSP_Output_String(Connection, "SPADD_STDBatch_BasicProduct", paramList));
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message, ex);
            }
        }
Beispiel #4
0
        public string Get_BasicProduct_Rework(string BatchID)
        {
            try
            {
                SqlParameter[] paramList = new SqlParameter[] {
                    new SqlParameter("@BatchID", BatchID),
                    new SqlParameter("@outParam", SqlDbType.VarChar, 50)
                    {
                        Direction = ParameterDirection.Output
                    }
                };

                return(Execute.RunSP_Output_String(Connection, "SPGET_Batch_Rework_BasicProduct", paramList));
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message, ex);
            }
        }
Beispiel #5
0
        public String Add(BatchPackingMR obj)
        {
            try
            {
                SqlParameter[] paramList = new SqlParameter[] {
                    new SqlParameter("@BatchNo", obj.BatchID),
                    new SqlParameter("@MRNO", obj.MRNO),
                    new SqlParameter("@BatchUsed", obj.BatchUsed),
                    new SqlParameter("@BatchDamaged", obj.BatchDamaged),
                    new SqlParameter("@BatchReturned", obj.BatchReturned),
                    new SqlParameter("@MRState", obj.State),
                    new SqlParameter("@IssuedBy", obj.IssuedBy),
                    new SqlParameter("@IssuedDate", obj.IssuedDate),
                    new SqlParameter("@BulkPrint", obj.BulkPrint)
                };

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