Esempio n. 1
0
        private void Load_Batch_List()
        {
            Status = (RPDBatch.RPDBatchStatus)cmbStatus.SelectedValue;

            gvRPDBatch.AutoGenerateColumns = false;
            bindRPDBatch.DataSource        = objRPDBatchDL.GetDataViewByState(Status, true);
            gvRPDBatch.DataSource          = bindRPDBatch;
            bindRPDBatch.ResetBindings(true);

            btnDelete.Enabled = false;
            btnSendMR.Visible = false;
            if (Status == RPDBatch.RPDBatchStatus.Created)
            {
                btnManage.Text    = "Approve";
                btnDelete.Enabled = true;
                btnManage.Visible = true;
            }
            else if (Status == RPDBatch.RPDBatchStatus.Approved)
            {
                btnManage.Text    = "Discarded";
                btnManage.Visible = true;
            }
            else
            {
                btnManage.Visible = false;
            }
        }
Esempio n. 2
0
        public System.Data.DataTable GetDataViewByState(RPDBatch.RPDBatchStatus state, bool QueryType)
        {
            try
            {
                SqlParameter[] paramList = new SqlParameter[] {
                    new SqlParameter("@RPDBatchStatus", state),
                    new SqlParameter("@QueryType", QueryType)
                };

                return(Execute.RunSP_DataTable(Connection, "SPGET_RPDBatch_View_By_Status", paramList));
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message, ex);
            }
        }
Esempio n. 3
0
        public int Finish(string RPDBatchID, RPDBatch.RPDBatchStatus theStatus)
        {
            try
            {
                SqlParameter[] paramList = new SqlParameter[] {
                    new SqlParameter("@RPDBatchID", RPDBatchID),
                    new SqlParameter("@RPDBatchStatus", (int)theStatus)
                };

                return(Execute.RunSP_RowsEffected(Connection, "SPUPDATE_RPDBatch_Finish", paramList));
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message, ex);
            }
        }
Esempio n. 4
0
        private void Load_List()
        {
            try
            {
                bindRPDBatch.DataSource = null;
                Status = (RPDBatch.RPDBatchStatus)cmbStatus.SelectedValue;

                gvRPDBatch.AutoGenerateColumns = false;
                bindRPDBatch.DataSource        = objRPDBatchDL.GetDataViewByState(Status, true);
                gvRPDBatch.DataSource          = bindRPDBatch;
                bindRPDBatch.ResetBindings(true);
            }
            catch (Exception)
            {
                MessageBox.Show(this, "Error occured while loading RPD Batch", "Error", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
        }