示例#1
0
        public void Load_Batches(Department objDep)
        {
            PRPDBatch.PRPDType TYPE1 = new PRPDBatch.PRPDType();
            PRPDBatch.PRPDType TYPE2 = new PRPDBatch.PRPDType();
            PRPDBatch.PRPDType TYPE3 = new PRPDBatch.PRPDType();

            try
            {
                //if ((objDep.DepHead.EmployeeID == CurrentUser.EmployeeID)|(objDepartment_DL.GetBySectionID(((int)objEmployee_DL.Get(CurrentUser.EmployeeID).Section))).DepType=="PRPD")
                //{
                TYPE1 = PRPDBatch.PRPDType.PrimaryPreperation;
                TYPE2 = PRPDBatch.PRPDType.PrimaryOutsource;
                TYPE3 = PRPDBatch.PRPDType.Rework;

                dtPRPDBatcByState = objPRPDBatch_DL.GetDataByStateAndType(PRPDBatch.PRPDBatchStatus.Approved, PRPDBatch.PRPDBatchStatus.Started,
                                                                          TYPE1, TYPE2, TYPE3);


                //}

                if (dtPRPDBatcByState.Rows.Count != 0)
                {
                    cmbPRPDBatchID.DataSource    = dtPRPDBatcByState;
                    cmbPRPDBatchID.SelectedIndex = 0;
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message.ToString());
            }
        }
示例#2
0
        public System.Data.DataTable GetDataByStateAndType(PRPDBatch.PRPDBatchStatus PRPDBatchStatus1, PRPDBatch.PRPDBatchStatus PRPDBatchStatus2,
                                                           PRPDBatch.PRPDType BatchType1, PRPDBatch.PRPDType BatchType2, PRPDBatch.PRPDType BatchType3)
        {
            try
            {
                SqlParameter[] paramList = new SqlParameter[] {
                    new SqlParameter("@PRPDBatchType1", (int)BatchType1),
                    new SqlParameter("@PRPDBatchType2", (int)BatchType2),
                    new SqlParameter("@PRPDBatchType3", (int)BatchType3),
                    new SqlParameter("@BatchState1", (int)PRPDBatchStatus1),
                    new SqlParameter("@BatchState2", (int)PRPDBatchStatus2)
                };

                return(Execute.RunSP_DataTable(Connection, "SPGET_PRPDBatchByTypeAndState", paramList));
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message, ex);
            }
        }
示例#3
0
        public System.Data.DataTable GetDataByState_Type(PRPDBatch.PRPDBatchStatus PRPDBatchStatus, PRPDBatch.PRPDType BatchType)
        {
            try
            {
                SqlParameter[] paramList = new SqlParameter[] {
                    new SqlParameter("@PRPDBatchStatus", (int)PRPDBatchStatus),
                    new SqlParameter("@BatchType", (int)BatchType)
                };

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