コード例 #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;
            }
        }
コード例 #2
0
        private void frmMRT_Load(object sender, EventArgs e)
        {
            try
            {
                Material  objMat = new Material();
                DataTable dt     = new DataTable();

                objDepartment           = objDepDL.GetByDepType("RPD");
                bindItemList.DataSource = null;
                objMRMaterialCollec.Clear();

                cmbStore.DataSource   = objStoreDL.Get();
                cmbBatchID.DataSource = objRPDBatch_DL.GetDataViewByState(RPDBatch.RPDBatchStatus.Approved, RPDBatch.RPDBatchStatus.Started, true);

                dt = objMaterialDL.GetDataView(MaterialCat);
                objSourceMaterial.DataSource = dt;

                cmbItem.DataSource = objSourceMaterial;



                objMat = objMaterialDL.Get(cmbItem.SelectedValue.ToString());
                if (objMat != null)
                {
                    lblUnit.Text = objMat.MatUnit.UnitCode;
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(this, ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
コード例 #3
0
 private void Load_List()
 {
     try
     {
         gvRPDBatch.AutoGenerateColumns = false;
         bindRPD.DataSource             = objRPDBatch_DL.GetDataViewByState(RPDBatch.RPDBatchStatus.Cost, true);
         gvRPDBatch.DataSource          = bindRPD;
         bindRPD.ResetBindings(true);
     }
     catch (Exception ex)
     {
         MessageBox.Show(this, "Error occured while loading", "Error", MessageBoxButtons.OK, MessageBoxIcon.Warning);
     }
 }
コード例 #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);
            }
        }
コード例 #5
0
        private void Load_BatchList()
        {
            try
            {
                DataTable dt = new DataTable();
                dt = objRPDBatchDL.GetDataViewByState(RPDBatch.RPDBatchStatus.Transfered, RPDBatch.RPDBatchStatus.Discarded, false);


                gvRPDBatch.AutoGenerateColumns = false;
                bindRPDBatch.DataSource        = dt;
                gvRPDBatch.DataSource          = bindRPDBatch;
                bindRPDBatch.ResetBindings(true);
            }
            catch (Exception)
            {
                MessageBox.Show(this, "Error occcured while loading", "Error", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
        }