Example #1
0
        public System.Data.DataTable GetMR_BulkPrint_Material_Packing(string StoreID, int MRType_ToBatch, MR.Status MRIssued, MR.Status MRReceived, MR.Status MRReceivedGRN, MR.Status MRReceivedSubStock)
        {
            try
            {
                SqlParameter[] paramList = new SqlParameter[] {
                    new SqlParameter("@StoreID", StoreID),
                    new SqlParameter("@MRType_Batch", MRType_ToBatch),
                    new SqlParameter("@MRStatus_Issued", (int)MRIssued),
                    new SqlParameter("@MRStatus_Received", (int)MRReceived),
                    new SqlParameter("@MRStatus_ReceviedGRN", (int)MRReceivedGRN),
                    new SqlParameter("@MRStatus_ReceviedSubStock", (int)MRReceivedSubStock)
                };

                return(Execute.RunSP_DataTable(Connection, "SPGET_MRMaterial_BulkPrint_Dataview", paramList));
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message, ex);
            }
        }
Example #2
0
        public RPDBatchCollec Get()
        {
            try
            {
                DataTable dt = Execute.RunSP_DataTable(Connection, "SPGET_RPDBatch");

                RPDBatchCollec objCollec = new RPDBatchCollec();
                RPDBatch       obj       = new RPDBatch();

                if (dt.Rows.Count > 0)
                {
                    for (int i = 0; i < dt.Rows.Count; i++)
                    {
                        obj.RPDBatchID             = Convert.ToString(dt.Rows[i]["RPDBatchID"]);
                        obj.RPDBatchSupervisedBy   = objEmployee_DL.Get(Convert.ToString(dt.Rows[i]["RPDBatchSuperviserID"]));
                        obj.RPDBatchMaterial       = objMaterial_DL.Get(Convert.ToString(dt.Rows[i]["RPDBatchMaterialCode"]));
                        obj.RPDBatchQty            = Convert.ToDecimal(dt.Rows[i]["RPDBatchQty"]);
                        obj.RPDBatchInstructedBy   = objEmployee_DL.Get(Convert.ToString(dt.Rows[i]["RPDBatchInstructedBy"]));
                        obj.RPDBatchInstructedDate = Convert.ToDateTime(dt.Rows[i]["RPDBatchInstructedDate"]);
                        obj.RPDBatchStartDate      = Convert.ToDateTime(dt.Rows[i]["RPDBatchStartDate"]);
                        obj.RPDBatchEndDate        = Convert.ToDateTime(dt.Rows[i]["RPDBatchEndDate"]);
                        obj.RPDBatchFinalQty       = Convert.ToDecimal(dt.Rows[i]["RPDBatchFinalQty"]);
                        obj.Status       = (RPDBatch.RPDBatchStatus)Enum.Parse(typeof(RPDBatch.RPDBatchStatus), Convert.ToString(dt.Rows[i]["RPDBatchStatus"]));
                        obj.RPDBatchMR   = objMR_DL.Get(Convert.ToInt64(dt.Rows[i]["RPDBatchMRNO"]));
                        obj.Type         = Convert.ToString(dt.Rows[i]["RPDBatchType"]);
                        obj.ApprovedBy   = objEmployee_DL.Get(Convert.ToString(dt.Rows[i]["RPDBatchApprovedBy"]));
                        obj.ApprovedDate = Convert.ToDateTime(dt.Rows[i]["RPDBatchApprovedDate"]);
                        obj.EndBy        = objEmployee_DL.Get(Convert.ToString(dt.Rows[i]["RPDBatchEndBy"]));


                        objCollec.Add(obj);
                    }
                }

                return(objCollec);
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message, ex);
            }
        }
        public PRPDBatchActivityDetails Get(long PRPDBatchActivityDetailsID)
        {

           try
           {
               SqlParameter[] paramList = new SqlParameter[] {
                
                new SqlParameter("@PRPDBatchActDetailsID" , PRPDBatchActivityDetailsID)};


               DataTable dt = Execute.RunSP_DataTable(Connection, "SPGET_PRPDBatchActivityDetailsByID", paramList);

               PRPDBatchActivityDetails obj = new PRPDBatchActivityDetails();

               if (dt.Rows.Count > 0)
               {

                   obj.PRPDBatchActDetailsID = Convert.ToInt64(dt.Rows[0]["PRPDBatchActDetailsID"]);
                   obj.PRPDBatchActivity= objPRPDBatchActivity_DL.Get(Convert.ToInt64(dt.Rows[0]["PRPDBatchBatchActID"]));
                   obj.SubActivity = Convert.ToString(dt.Rows[0]["SubActivity"]);
                   obj.ActivityDate = Convert.ToDateTime(dt.Rows[0]["ActivityDate"]);
                   obj.StartTime = Convert.ToDateTime(dt.Rows[0]["StartTime"]);
                   obj.StopTime = Convert.ToDateTime(dt.Rows[0]["StopTime"]);
                   obj.StartQty = Convert.ToDecimal(dt.Rows[0]["StartQty"]);
                   obj.StopQty = Convert.ToDecimal(dt.Rows[0]["StopQty"]);
                   obj.SupervisedBy = objEmployee_DL.Get(Convert.ToString(dt.Rows[0]["SupervisedBy"]));
                   obj.Remarks = Convert.ToString(dt.Rows[0]["Remarks"]);
                   obj.NoOfTrays = Convert.ToInt64(dt.Rows[0]["NoOfTrays"]);
                   obj.WeightLoss = Convert.ToDecimal(dt.Rows[0]["WeightLoss"]);
               }

               return obj;


           }
           catch (Exception ex)
           {

               throw new Exception(ex.Message, ex);
           }
       }
Example #4
0
        public PRPDBatchActivity Get(long PRPDBatchActivityID)
        {
            try
            {
                SqlParameter[] paramList = new SqlParameter[] {
                    new SqlParameter("@PRPDBatchActivity", PRPDBatchActivityID)
                };


                DataTable dt = Execute.RunSP_DataTable(Connection, "SPGET_PRPDBatchActivityByID", paramList);

                PRPDBatchActivity obj = new PRPDBatchActivity();

                if (dt.Rows.Count > 0)
                {
                    obj.PRPDBatchActivityID = Convert.ToInt64(dt.Rows[0]["PRPDBatchActivity"]);
                    obj.PRPDBatchID         = Convert.ToString(dt.Rows[0]["PRPDBatchID"]);
                    obj.MainActID           = Convert.ToInt64(dt.Rows[0]["MainActID"]);
                    obj.StartedDate         = Convert.ToDateTime(dt.Rows[0]["StartedDate"]);
                    if (dt.Rows[0]["EndDate"] != DBNull.Value)
                    {
                        obj.EndDate = Convert.ToDateTime(dt.Rows[0]["EndDate"]);
                    }
                    obj.SupervisedBy        = objEmployee_DL.Get(Convert.ToString(dt.Rows[0]["SupervisedBy"]));
                    obj.Comments            = Convert.ToString(dt.Rows[0]["Comments"]);
                    obj.State               = (PRPDBatchActivity.ActStatus)Enum.Parse(typeof(PRPDBatchActivity.ActStatus), Convert.ToString(dt.Rows[0]["ActStatus"]));
                    obj.SectionOverHeadRate = Convert.ToDecimal(dt.Rows[0]["SectionOverHeadRate"]);
                    obj.StartQty            = Convert.ToDecimal(dt.Rows[0]["StartQty"]);
                    if (dt.Rows[0]["StopQty"] != DBNull.Value)
                    {
                        obj.StopQty = Convert.ToDecimal(dt.Rows[0]["StopQty"]);
                    }
                }

                return(obj);
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message, ex);
            }
        }
Example #5
0
        public DataTable Get_DataView_PrimaryPacking(Batch.Status Status1, Batch.Status Status2, long UserID, string BasicProductType, string ActType, int BatchActivity_Initial, int BatchActivity_Start)
        {
            try
            {
                SqlParameter[] paramList = new SqlParameter[] {
                    new SqlParameter("@Status1", Status1),
                    new SqlParameter("@Status2", Status2),
                    new SqlParameter("@UserID", UserID),
                    new SqlParameter("@BasicProductType", BasicProductType),
                    new SqlParameter("@ActType", ActType),
                    new SqlParameter("@BatchActivity_Initial", BatchActivity_Initial),
                    new SqlParameter("@BatchActivity_Start", BatchActivity_Start)
                };

                return(Execute.RunSP_DataTable(Connection, "SPGET_Batch_By_Status_view_PrimaryPacking", paramList));
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message, ex);
            }
        }
Example #6
0
        public DataTable Get_DataView_Packing_All(Batch.Status Status1, Batch.Status Status2, Batch.Status Status3, Batch.Status Status4, Batch.Status Status5, long UserID, string BasicProductType)
        {
            try
            {
                SqlParameter[] paramList = new SqlParameter[] {
                    new SqlParameter("@Status1", Status1),
                    new SqlParameter("@Status2", Status2),
                    new SqlParameter("@Status3", Status3),
                    new SqlParameter("@Status4", Status4),
                    new SqlParameter("@Status5", Status5),
                    new SqlParameter("@UserID", UserID),
                    new SqlParameter("@BasicProductType", BasicProductType)
                };

                return(Execute.RunSP_DataTable(Connection, "SPGET_Batch_By_Status_view_Packing_All", paramList));
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message, ex);
            }
        }
Example #7
0
        public System.Data.DataTable GetDataView(long DepID, DateTime From, DateTime To, GRN.Status Status)
        {
            try
            {
                SqlParameter[] paramList = new SqlParameter[] {
                    new SqlParameter("@Status", Status),
                    new SqlParameter("@DateFrom", From),
                    new SqlParameter("@DateTo", To),
                    new SqlParameter("@DepID", DepID)
                };

                DataTable dt = Execute.RunSP_DataTable(Connection, "SPGET_GRN_Manage", paramList);


                return(dt);
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message, ex);
            }
        }
Example #8
0
        public System.Data.DataTable GetDataView(long UserID, MTN.Status Status)
        {
            try
            {
                SqlParameter[] paramList = new SqlParameter[] {
                    new SqlParameter("@UserID", UserID),
                    new SqlParameter("@Status", Status)
                };


                DataTable dt = Execute.RunSP_DataTable(Connection, "SPGET_MTN_ByFromDep_Status", paramList);



                return(dt);
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message, ex);
            }
        }
Example #9
0
        public System.Data.DataTable Get_Basic_Transfers(long MTNType, int MTNStatus, int MTNItemType)
        {
            try
            {
                SqlParameter[] paramList = new SqlParameter[] {
                    new SqlParameter("@MTNType", MTNType),
                    new SqlParameter("@Status", MTNStatus),
                    new SqlParameter("@MTNItemType", MTNItemType)
                };


                DataTable dt = Execute.RunSP_DataTable(Connection, "SPGET_MTN_BasicTransfers", paramList);


                return(dt);
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message, ex);
            }
        }
Example #10
0
        public DataTable GetRequirement_Full(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)
                };

                return(Execute.RunSP_DataTable(Connection, "SPGET_PlanMaterial_Full", paramList));
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message, ex);
            }
        }
Example #11
0
        public DataTable Get(int Year, string Month, int WeekID, int RevisionID)
        {
            try
            {
                SqlParameter[] paramList = new SqlParameter[] {
                    new SqlParameter("@Year", Year),
                    new SqlParameter("@Month", Month),
                    new SqlParameter("@RevisionID", RevisionID),
                    new SqlParameter("@WeekID", WeekID)
                };


                DataTable dt = Execute.RunSP_DataTable(Connection, "SPGET_PlanBatch_ByWeek", paramList);

                return(dt);
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message, ex);
            }
        }
Example #12
0
        public MTNCollec Get()
        {
            Employee_DL   objEmployee_DL   = new Employee_DL(Connection);
            Department_DL objDepartment_DL = new Department_DL(Connection);
            MTNCollec     objMTNCollec     = new MTNCollec();
            Store_DL      objStore_DL      = new Store_DL(Connection);
            GRN_DL        objGRN_DL        = new GRN_DL(Connection);

            try
            {
                DataTable dt = Execute.RunSP_DataTable(Connection, "SPGET_MTN");

                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    MTN objMTN = new MTN();

                    objMTN.MTNApprovedBy     = objEmployee_DL.Get(Convert.ToString(dt.Rows[i]["MTNApprovedBy"]));
                    objMTN.MTNApprovedDate   = Convert.ToDateTime(dt.Rows[i]["MTNApproveDate"]);
                    objMTN.MTNBatch          = "No";
                    objMTN.MTNDate           = Convert.ToDateTime(dt.Rows[i]["MTNDate"]);
                    objMTN.MTNDepartmentFrom = objDepartment_DL.Get(Convert.ToInt64(dt.Rows[i]["MTNFromDepID"]));
                    objMTN.MTNDepartmentTo   = objDepartment_DL.Get(Convert.ToInt64(dt.Rows[i]["MTNToDepID"]));
                    objMTN.MTNEnterdBy       = objEmployee_DL.Get(Convert.ToString(dt.Rows[i]["MTNEnterdBy"]));
                    objMTN.MTNNo             = Convert.ToInt64(dt.Rows[i]["MTNNo"]);
                    objMTN.MTNReceivedBy     = objEmployee_DL.Get(Convert.ToString(dt.Rows[i]["MTNReceivedBy"]));
                    objMTN.MTNReceivedDate   = Convert.ToDateTime(dt.Rows[i]["MTNReceivedDate"]);
                    objMTN.MTNStatus         = (MTN.Status)dt.Rows[i]["MTNStatus"];
                    objMTN.MTNType           = (MTN.Type)dt.Rows[i]["MTNType"];
                    objMTN.MTNItemType       = (MTN.ItemType)dt.Rows[i]["MTNItemType"];
                    objMTN.MTNStore          = objStore_DL.Get(Convert.ToString(dt.Rows[i]["MTNStore"]));

                    objMTNCollec.Add(objMTN);
                }
                return(objMTNCollec);
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message, ex);
            }
        }
Example #13
0
        public ActivityMachineCollec Get(Activity objActivity)
        {
            ActivityMachineCollec objActivityMachineCollec = new ActivityMachineCollec();
            Activity_DL           objActivityDL            = new Activity_DL(Connection);
            Machine_DL            objMachineDL             = new Machine_DL(Connection);

            try
            {
                SqlParameter[] paramList = new SqlParameter[] {
                    new SqlParameter("@ActID", objActivity.ActivityID)
                };

                DataTable dt = Execute.RunSP_DataTable(Connection, "SPGET_ActivityMachine_By_ActID", paramList);

                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    ActivityMachine obj = new ActivityMachine();

                    if (dt.Rows[i]["ActID"] != null)
                    {
                        obj.Activity = objActivityDL.Get(Convert.ToInt64(dt.Rows[i]["ActID"]));
                    }

                    if (dt.Rows[i]["MachineID"] != null)
                    {
                        obj.Machine = objMachineDL.Get(Convert.ToString(dt.Rows[i]["MachineID"]));
                    }

                    obj.EstimatedHour = Convert.ToDecimal(dt.Rows[i]["EstimatedHours"]);

                    objActivityMachineCollec.Add(obj);
                }

                return(objActivityMachineCollec);
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message, ex);
            }
        }
Example #14
0
        public DataTable Get_BatchList_ToSendMR(int Status1, int Status2, int Status3, int Status4, long UserID)
        {
            try
            {
                SqlParameter[] paramList = new SqlParameter[] {
                    new SqlParameter("@Status1", Status1),
                    new SqlParameter("@Status2", Status2),
                    new SqlParameter("@Status3", Status3),
                    new SqlParameter("@Status4", Status4),
                    new SqlParameter("@UserID", UserID)
                };

                DataTable dt = Execute.RunSP_DataTable(Connection, "SPGET_Batch_By_MRRaise", paramList);


                return(dt);
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message, ex);
            }
        }
        public RPDActivityDetailsLabourCollec Get_By_BatchAct(long ID)
        {
            try
            {
                SqlParameter[] paramList = new SqlParameter[] {
                    new SqlParameter("@BatchActID", ID)
                };

                DataTable dt = Execute.RunSP_DataTable(Connection, "SPGET_RPDActivityDetailsLabour_BatchActID", paramList);

                RPDActivityDetailsLabourCollec objCollec = new RPDActivityDetailsLabourCollec();
                RPDActivityDetailsLabour       obj       = new RPDActivityDetailsLabour();

                if (dt.Rows.Count > 0)
                {
                    for (int i = 0; i < dt.Rows.Count; i++)
                    {
                        obj.ActivityDetailsLabourID = Convert.ToInt64(dt.Rows[i]["ActivityDetailsLabourID"]);
                        obj.BatchActID  = Convert.ToInt64(dt.Rows[i]["BatchActID"]);
                        obj.Description = Convert.ToString(dt.Rows[i]["Description"]);
                        obj.Helper      = Convert.ToString(dt.Rows[i]["Helper"]);
                        obj.StartTime_D = Convert.ToDateTime(dt.Rows[i]["StartTime"]);
                        obj.StopTime_D  = Convert.ToDateTime(dt.Rows[i]["StopTime"]);
                        obj.OTHours     = Convert.ToDecimal(dt.Rows[i]["OTHours"]);
                        obj.HourlyRate  = Convert.ToDecimal(dt.Rows[i]["HourlyRate"]);
                        obj.OTRate      = Convert.ToDecimal(dt.Rows[i]["OTRate"]);


                        objCollec.Add(obj);
                    }
                }

                return(objCollec);
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message, ex);
            }
        }
Example #16
0
        public Supplier Get(long SupID)
        {
            try
            {
                SqlParameter[] paramList = new SqlParameter[] {
                    new SqlParameter("@SupplierID", SupID)
                };

                DataTable dt = Execute.RunSP_DataTable(Connection, "SPGET_SupplierByID", paramList);


                Supplier obj = new Supplier();

                if (dt.Rows.Count > 0)
                {
                    obj.SupplieName           = Convert.ToString(dt.Rows[0]["SupName"]);
                    obj.SupplierAddress       = Convert.ToString(dt.Rows[0]["SupAddress"]);
                    obj.SupplierCode          = Convert.ToString(dt.Rows[0]["SupplierID"]);
                    obj.SupplierContactPerson = Convert.ToString(dt.Rows[0]["SupContactPerson"]);
                    obj.SupplierEmail         = Convert.ToString(dt.Rows[0]["SupEmail"]);
                    obj.SupplierFax           = Convert.ToString(dt.Rows[0]["SupFax"]);
                    obj.SupplierID            = Convert.ToInt64(dt.Rows[0]["SupplierID"]);
                    obj.SupplierMobile        = Convert.ToString(dt.Rows[0]["SupMobile"]);
                    obj.SupplierPhone         = Convert.ToString(dt.Rows[0]["SupPhone"]);

                    obj.SupplierStatus = Convert.ToBoolean(dt.Rows[0]["SupplierStatus"]);
                    obj.SupplierType   = Convert.ToString(dt.Rows[0]["SupMobile"]);
                    obj.SupplierPhone  = Convert.ToString(dt.Rows[0]["SupPhone"]);
                    obj.SupplierVat    = Convert.ToBoolean(dt.Rows[0]["SupVat"]);
                    obj.SupplierVATNo  = Convert.ToString(dt.Rows[0]["SupVatNumber"]);
                }

                return(obj);
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message, ex);
            }
        }
Example #17
0
        public PRPDBatchActivityInstructions.PRPDBatchActivityInstructionsCollec Get(String PRPDBatchNo)
        {
            try
            {
                SqlParameter[] paramList = new SqlParameter[] {
                    new SqlParameter("@PRPDBatchID", PRPDBatchNo)
                };

                DataTable dt = Execute.RunSP_DataTable(Connection, "SPGET_PRPDBatchActivityInstructionsByBatchID", paramList);

                PRPDBatchActivityInstructions.PRPDBatchActivityInstructionsCollec objCollec = new PRPDBatchActivityInstructions.PRPDBatchActivityInstructionsCollec();

                PRPDBatchActivityInstructions obj = new PRPDBatchActivityInstructions();

                if (dt.Rows.Count > 0)
                {
                    for (int i = 0; i < dt.Rows.Count; i++)
                    {
                        obj.PRPDBatchActivityInstructionsID = Convert.ToInt64(dt.Rows[i]["PRPDBatchActivityInstructionsID"]);
                        obj.PRPDBatch       = objPRPDBatch_DL.Get(Convert.ToString(dt.Rows[i]["PRPDBatchID"]));
                        obj.ActivityID      = Convert.ToInt64(dt.Rows[i]["ActivityID"]);
                        obj.MachineCode     = Convert.ToString(dt.Rows[i]["MachineID"]);
                        obj.Machine         = objMachine_DL.Get(Convert.ToString(dt.Rows[i]["MachineID"]));
                        obj.Activity        = objMainActivity_DL.Get(Convert.ToInt64(dt.Rows[i]["ActivityID"]));
                        obj.ParticleSize    = Convert.ToString(dt.Rows[i]["ParticleSize"]);
                        obj.InstructionDesc = Convert.ToString(dt.Rows[i]["InstructionDesc"]);
                        obj.Activity        = objMainActivity_DL.Get(Convert.ToInt64(dt.Rows[i]["MainActivity"]));

                        objCollec.Add(obj);
                    }
                }

                return(objCollec);
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message, ex);
            }
        }
Example #18
0
        public Stock Get(long StockID)
        {
            Store_DL         objStore_DL         = new Store_DL(Connection);
            Material_DL      objMaterial_DL      = new Material_DL(Connection);
            BasicProduct_DL  objBasicProduct_DL  = new BasicProduct_DL(Connection);
            FinishProduct_DL objFinishProduct_DL = new FinishProduct_DL(Connection);

            Stock objStock = new Stock();

            try
            {
                SqlParameter[] paramList = new SqlParameter[] {
                    new SqlParameter("@StockID", StockID)
                };

                DataTable dt = Execute.RunSP_DataTable(Connection, "SPGET_StockByID", paramList);

                objStock.StockBasicProduct  = objBasicProduct_DL.Get(Convert.ToString(dt.Rows[0]["StockBasicProduct"]));
                objStock.StockEconomicalQty = Convert.ToDecimal(dt.Rows[0]["StockEconomicalQty"]);
                objStock.StockFinishProduct = objFinishProduct_DL.Get(Convert.ToString(dt.Rows[0]["StockFinishProduct"]));
                objStock.StockID            = Convert.ToInt64(dt.Rows[0]["StockID"]);
                objStock.StockMaterial      = objMaterial_DL.Get(Convert.ToString(dt.Rows[0]["StockMaterialID"]));
                objStock.StockMaximumQty    = Convert.ToDecimal(dt.Rows[0]["StockMaximumQty"]);
                objStock.StockMinimumQty    = Convert.ToDecimal(dt.Rows[0]["StockMinimumQty"]);
                objStock.StockQty           = Convert.ToDecimal(dt.Rows[0]["StockQty"]);
                objStock.StockReorderLevel  = Convert.ToDecimal(dt.Rows[0]["StockReorderLevel"]);
                objStock.StockReservedQty   = Convert.ToDecimal(dt.Rows[0]["StockReservedQty"]);
                objStock.StockStatus        = (Stock.Status)(dt.Rows[0]["StockStatus"]);
                objStock.StockStore         = objStore_DL.Get(Convert.ToString(dt.Rows[0]["StoreID"]));
                objStock.StockType          = (Stock.Type)(dt.Rows[0]["StockType"]);


                return(objStock);
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message, ex);
            }
        }
Example #19
0
        public MachineType Get(long MachineTypeID)
        {
            try
            {
                SqlParameter[] paramList = new SqlParameter[] {
                    new SqlParameter("@MachineTypeID", MachineTypeID)
                };

                DataTable dt = Execute.RunSP_DataTable(Connection, "SPGET_MachineTypeByID", paramList);

                MachineType objMachineType = new MachineType();

                objMachineType.MachineTypeID    = Convert.ToInt64(dt.Rows[0]["MachineTypeID"]);
                objMachineType.MachineTypeTitle = Convert.ToString(dt.Rows[0]["MachineType"]);

                return(objMachineType);
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message, ex);
            }
        }
Example #20
0
        public System.Data.DataTable GetDataView(DateTime To, DateTime From, long Department, MTN.Status Status)
        {
            try
            {
                SqlParameter[] paramList = new SqlParameter[] {
                    new SqlParameter("@FromDate", From),
                    new SqlParameter("@ToDate", To),
                    new SqlParameter("@MTNStatus", Status),
                    new SqlParameter("@DepID", Department)
                };


                DataTable dt = Execute.RunSP_DataTable(Connection, "SPGET_MTN_Dataview_Manage", paramList);


                return(dt);
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message, ex);
            }
        }
Example #21
0
        public RPDBatch Get(String RPDBatchID)
        {
            try
            {
                SqlParameter[] paramList = new SqlParameter[] {
                    new SqlParameter("@RPDBatchID", RPDBatchID)
                };


                DataTable dt = Execute.RunSP_DataTable(Connection, "SPGET_RPDBatch_By_ID", paramList);

                RPDBatch obj = new RPDBatch();

                if (dt.Rows.Count > 0)
                {
                    obj.RPDBatchID             = Convert.ToString(dt.Rows[0]["RPDBatchID"]);
                    obj.RPDBatchSupervisedBy   = objEmployee_DL.Get(Convert.ToString(dt.Rows[0]["RPDBatchSuperviserID"]));
                    obj.RPDBatchMaterial       = objMaterial_DL.Get(Convert.ToString(dt.Rows[0]["RPDBatchMaterialCode"]));
                    obj.RPDBatchQty            = Convert.ToDecimal(dt.Rows[0]["RPDBatchQty"]);
                    obj.RPDBatchInstructedBy   = objEmployee_DL.Get(Convert.ToString(dt.Rows[0]["RPDBatchInstructedBy"]));
                    obj.RPDBatchInstructedDate = Convert.ToDateTime(dt.Rows[0]["RPDBatchInstructedDate"]);
                    obj.RPDBatchStartDate      = Convert.ToDateTime(dt.Rows[0]["RPDBatchStartDate"]);
                    obj.RPDBatchEndDate        = Convert.ToDateTime(dt.Rows[0]["RPDBatchEndDate"]);
                    obj.RPDBatchFinalQty       = Convert.ToDecimal(dt.Rows[0]["RPDBatchFinalQty"]);
                    obj.Status       = (RPDBatch.RPDBatchStatus)Enum.Parse(typeof(RPDBatch.RPDBatchStatus), Convert.ToString(dt.Rows[0]["RPDBatchStatus"]));
                    obj.RPDBatchMR   = objMR_DL.Get(Convert.ToInt64(dt.Rows[0]["RPDBatchMRNO"]));
                    obj.Type         = Convert.ToString(dt.Rows[0]["RPDBatchType"]);
                    obj.ApprovedBy   = objEmployee_DL.Get(Convert.ToString(dt.Rows[0]["RPDBatchApprovedBy"]));
                    obj.ApprovedDate = Convert.ToDateTime(dt.Rows[0]["RPDBatchApprovedDate"]);
                    obj.EndBy        = objEmployee_DL.Get(Convert.ToString(dt.Rows[0]["RPDBatchEndBy"]));
                }

                return(obj);
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message, ex);
            }
        }
Example #22
0
        public MRFinishProduct Get(long MRNO, String FinishProductCode)
        {
            try
            {
                SqlParameter[] paramList = new SqlParameter[] {
                    new SqlParameter("@MRNO", MRNO),
                    new SqlParameter("@FinishProductCode", FinishProductCode)
                };



                DataTable dt = Execute.RunSP_DataTable(Connection, "SPGET_MRFinishProductCode", paramList);

                MRFinishProduct objMRFinishProduct = new MRFinishProduct();

                objMRFinishProduct.FinishProduct = objFinishProduct_DL.Get(Convert.ToString(dt.Rows[0]["MRFinishProductID"]));
                objMRFinishProduct.Description   = Convert.ToString(dt.Rows[0]["MRDescription"]);
                objMRFinishProduct.MR            = objMR_DL.Get(Convert.ToInt64(dt.Rows[0]["MRNO"]));
                objMRFinishProduct.MRBINNo       = Convert.ToString(dt.Rows[0]["MRBINNo"]);
                objMRFinishProduct.ReqdQty       = Convert.ToDecimal(dt.Rows[0]["MRReqdQty"]);
                objMRFinishProduct.IssuedQty     = Convert.ToDecimal(dt.Rows[0]["MRIssuedQty"]);
                //objMRFinishProduct.UniRate = Convert.ToDecimal(dr.MRUnitRate);

                if (dt.Rows[0]["MRIssuedQty"] != null)
                {
                    objMRFinishProduct.UniRate = Convert.ToDecimal(dt.Rows[0]["MRIssuedQty"]);
                }
                else
                {
                    objMRFinishProduct.UniRate = 0;
                }

                return(objMRFinishProduct);
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message, ex);
            }
        }
        public DataTable Get(String RPDBatchID)
        {


            try
            {


                SqlParameter[] paramList = new SqlParameter[] {
                
                new SqlParameter("@RPDBatchID", RPDBatchID)};

                return Execute.RunSP_DataTable(Connection, "SPGET_RPDBatchActualProduction_By_RPDBatchID", paramList);

            }
            catch (Exception ex)
            {

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

        }
Example #24
0
        public MTNBasicProduct Get(long MTNNO, String BasicProductCode)
        {
            BasicProduct_DL objBasicProduct_DL = new BasicProduct_DL(Connection);
            MTN_DL          objMTN_DL          = new MTN_DL(Connection);

            MTNBasicProduct objMTNBasicProduct = new MTNBasicProduct();

            try
            {
                SqlParameter[] paramList = new SqlParameter[] {
                    new SqlParameter("@MTNNO", MTNNO),
                    new SqlParameter("@BasicProductCode", BasicProductCode)
                };

                DataTable dt = Execute.RunSP_DataTable(Connection, "SPGET_MTNBasicProductByID", paramList);
                if (dt.Rows.Count > 0)
                {
                    objMTNBasicProduct.BasicProduct = objBasicProduct_DL.Get(Convert.ToString(dt.Rows[0]["MTNBasicProductID"]));
                    objMTNBasicProduct.Batch        = "No";
                    objMTNBasicProduct.MTN          = objMTN_DL.Get(Convert.ToInt64(dt.Rows[0]["MTNNO"]));
                    objMTNBasicProduct.ReceivedQty  = Convert.ToDecimal(dt.Rows[0]["MTNRceivedQty"]);

                    if (dt.Rows[0]["MTNUnitRate"] != DBNull.Value)
                    {
                        objMTNBasicProduct.UnitRate = Convert.ToDecimal(dt.Rows[0]["MTNUnitRate"]);
                    }
                    if (dt.Rows[0]["MTNTransferQty"] != DBNull.Value)
                    {
                        objMTNBasicProduct.TransferQty = Convert.ToDecimal(dt.Rows[0]["MTNTransferQty"]);
                    }
                }
                return(objMTNBasicProduct);
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message, ex);
            }
        }
Example #25
0
        public MRMaterialCollec Get()
        {
            try
            {
                DataTable dt = Execute.RunSP_DataTable(Connection, "SPGET_MRMaterial");

                MRMaterialCollec objMRMaterialCollec = new MRMaterialCollec();

                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    MRMaterial objMRMaterial = new MRMaterial();

                    objMRMaterial.Description = Convert.ToString(dt.Rows[i]["MRDescription"]);
                    objMRMaterial.Material    = objMaterial_DL.Get(Convert.ToString(dt.Rows[i]["MRMaterialCode"]));
                    objMRMaterial.MR          = objMR_DL.Get(Convert.ToInt64(dt.Rows[i]["MRNO"]));
                    objMRMaterial.MRBINNo     = Convert.ToString(dt.Rows[i]["MRBINNo"]);
                    objMRMaterial.ReqdQty     = Convert.ToDecimal(dt.Rows[i]["MRReqdQty"]);
                    objMRMaterial.IssuedQty   = Convert.ToDecimal(dt.Rows[i]["MRIssuedQty"]);

                    if (dt.Rows[i]["MRUnitRate"] != null)
                    {
                        objMRMaterial.UniRate = Convert.ToDecimal(dt.Rows[i]["MRUnitRate"]);
                    }
                    else
                    {
                        objMRMaterial.UniRate = 0;
                    }
                    objMRMaterial.UnitCode = objMaterial_DL.Get(Convert.ToString(dt.Rows[i]["MRMaterialCode"])).MatUnit.UnitCode;

                    objMRMaterialCollec.Add(objMRMaterial);
                }
                return(objMRMaterialCollec);
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message, ex);
            }
        }
Example #26
0
        public CompanyOverHeadRate Get()
        {
            try
            {
                CompanyOverHeadRate obj = new CompanyOverHeadRate();


                DataTable dt = Execute.RunSP_DataTable(Connection, "SPGET_OverheadRates");


                obj.EnterdBy   = objEmployee_DL.Get(Convert.ToString(dt.Rows[0]["EnterdBy"]));
                obj.EnterdDate = Convert.ToDateTime(dt.Rows[0]["Date"]);
                obj.ID         = Convert.ToInt64(dt.Rows[0]["DepID"]);
                obj.Rate       = Convert.ToDecimal(dt.Rows[0]["Rate"]);


                return(obj);
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message, ex);
            }
        }
Example #27
0
        public DataTable Get_DataView(string STDBatchID)
        {
            ActivityCollec  objActivityCollec = new ActivityCollec();
            STDBatch_DL     objBatchDL        = new STDBatch_DL(Connection);
            MainActivity_DL objMainActDL      = new MainActivity_DL(Connection);

            try
            {
                SqlParameter[] paramList = new SqlParameter[] {
                    new SqlParameter("@ActSTDBatchID", STDBatchID)
                };


                DataTable dt = Execute.RunSP_DataTable(Connection, "SPGET_Activity_By_STDBatchID", paramList);


                return(dt);
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message, ex);
            }
        }
Example #28
0
        public MaterialCategoryCollec Get()
        {
            try
            {
                DataTable dt = Execute.RunSP_DataTable(Connection, "SPGET_MaterialCategory");


                MaterialCategoryCollec obj = new MaterialCategoryCollec();

                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    MaterialCategory objMatCat = new MaterialCategory();
                    objMatCat.MatCatID             = Convert.ToString(dt.Rows[0]["MatCatID"]);
                    objMatCat.MaterialCategoryName = Convert.ToString(dt.Rows[0]["MaterialCategory"]);
                    obj.Add(objMatCat);
                }
                return(obj);
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message, ex);
            }
        }
Example #29
0
        public MRFinishProductCollec Get()
        {
            try
            {
                DataTable dt = Execute.RunSP_DataTable(Connection, "SPGET_MRFinishProduct");

                MRFinishProductCollec objMRFinishProductCollec = new MRFinishProductCollec();

                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    MRFinishProduct objMRFinishProduct = new MRFinishProduct();
                    objMRFinishProduct.FinishProduct = objFinishProduct_DL.Get(Convert.ToString(dt.Rows[i]["MRFinishProductID"]));
                    objMRFinishProduct.Description   = Convert.ToString(dt.Rows[i]["MRDescription"]);
                    objMRFinishProduct.MR            = objMR_DL.Get(Convert.ToInt64(dt.Rows[i]["MRIssuedQty"]));
                    objMRFinishProduct.MRBINNo       = Convert.ToString(dt.Rows[i]["MRIssuedQty"]);
                    objMRFinishProduct.ReqdQty       = Convert.ToDecimal(dt.Rows[i]["MRIssuedQty"]);
                    objMRFinishProduct.IssuedQty     = Convert.ToDecimal(dt.Rows[i]["MRIssuedQty"]);
                    //objMRFinishProduct.UniRate = Convert.ToDecimal(dr.MRUnitRate);

                    if (dt.Rows[i]["MRIssuedQty"] != null)
                    {
                        objMRFinishProduct.UniRate = Convert.ToDecimal(dt.Rows[i]["MRIssuedQty"]);
                    }
                    else
                    {
                        objMRFinishProduct.UniRate = 0;
                    }

                    objMRFinishProductCollec.Add(objMRFinishProduct);
                }
                return(objMRFinishProductCollec);
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message, ex);
            }
        }
Example #30
0
        public PlanWeeksCollec GetByMonth(int Year, string Month)
        {
            try
            {
                SqlParameter[] paramList = new SqlParameter[] {
                    new SqlParameter("@Year", Year),
                    new SqlParameter("@Month", Month)
                };


                DataTable dt = Execute.RunSP_DataTable(Connection, "SPGET_PlanWeeks_ByMonth", paramList);

                PlanWeeksCollec objCollec = new PlanWeeksCollec();

                if (dt.Rows.Count > 0)
                {
                    PlanWeeks obj = new PlanWeeks();
                    for (int i = 0; i < dt.Rows.Count; i++)
                    {
                        obj.State    = Convert.ToInt32(dt.Rows[i]["State"]);
                        obj.FromDate = Convert.ToDateTime(dt.Rows[i]["FromDate"]);
                        obj.ToDate   = Convert.ToDateTime(dt.Rows[i]["ToDate"]);
                        obj.WeekID   = Convert.ToInt32(dt.Rows[i]["WeekID"]);
                        obj.Month    = Convert.ToString(dt.Rows[i]["Month"]);
                        obj.Year     = Convert.ToInt32(dt.Rows[i]["Year"]);
                    }

                    objCollec.Add(obj);
                }

                return(objCollec);
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message, ex);
            }
        }