private void Load_Batch_List() { ManageButtons(); PRPDBatch.PRPDType theType; try { objSourceInstructions.DataSource = null; objSourcePRPDBatches.DataSource = null; PRPDBatch.PRPDBatchStatus state = (PRPDBatch.PRPDBatchStatus)Enum.Parse(typeof(PRPDBatch.PRPDBatchStatus), cmbPRPDBatchStatus.SelectedItem.ToString()); if (rdbPP.Checked == true) { theType = PRPDBatch.PRPDType.PrimaryPreperation; } else if (rdbPPRe.Checked == true) { theType = PRPDBatch.PRPDType.PrimaryOutsource; } else { theType = PRPDBatch.PRPDType.Rework; } dtPRPDBatches = objPRPDBatch_DL.GetDataByState_Type((PRPDBatch.PRPDBatchStatus)Enum.Parse(typeof(PRPDBatch.PRPDBatchStatus), cmbPRPDBatchStatus.SelectedValue.ToString()), theType); dgvPRPDbatchByState.AutoGenerateColumns = false; dgvPRPDbatchByState.DataSource = objSourcePRPDBatches; objSourcePRPDBatches.DataSource = dtPRPDBatches; objSourcePRPDBatches.ResetBindings(true); } catch (Exception ex) { MessageBox.Show(ex.Message.ToString()); } }
public System.Data.DataTable GetDataByState(PRPDBatch.PRPDBatchStatus PRPDBatchStatus) { try { SqlParameter[] paramList = new SqlParameter[] { new SqlParameter("@PRPDBatchStatus", (int)PRPDBatchStatus) }; return(Execute.RunSP_DataTable(Connection, "SPGET_PRPDBatch_View_Status", paramList)); } catch (Exception ex) { throw new Exception(ex.Message, ex); } }
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// public System.Data.DataTable GetDataViewByState(PRPDBatch.PRPDBatchStatus state, bool QueryType) { try { SqlParameter[] paramList = new SqlParameter[] { new SqlParameter("@PRPDBatchStatus", state), new SqlParameter("@QueryType", QueryType) }; return(Execute.RunSP_DataTable(Connection, "SPGET_PRPDBatch_View_By_Status", paramList)); } catch (Exception ex) { throw new Exception(ex.Message, ex); } }
public int Finish(string PRPDBatchID, PRPDBatch.PRPDBatchStatus theStatus) { try { SqlParameter[] paramList = new SqlParameter[] { new SqlParameter("@PRPDBatchID", PRPDBatchID), new SqlParameter("@PRPDBatchStatus", (int)theStatus) }; return(Execute.RunSP_RowsEffected(Connection, "SPUPDATE_PRPDBatch_Finish", paramList)); } catch (Exception ex) { throw new Exception(ex.Message, ex); } }
public System.Data.DataTable GetDataView(String InstructedBy, PRPDBatch.PRPDBatchStatus Status, DateTime From, DateTime To) { try { SqlParameter[] paramList = new SqlParameter[] { new SqlParameter("@InstructedBy", InstructedBy), new SqlParameter("@PRPDBatchStatus", Status), new SqlParameter("@FromDate", From), new SqlParameter("@ToDate", To) }; return(Execute.RunSP_DataTable(Connection, "SPGET_PRPDBatch_View_By_InstructedBy", paramList)); } catch (Exception ex) { throw new Exception(ex.Message, ex); } }
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); } }