Exemple #1
0
 private void dgvData_SelectionChanged(object sender, EventArgs e)
 {
     if (dgvData.SelectedCells.Count <= 0)
     {
         return;
     }
     stockoutData = dgvData.Rows[dgvData.SelectedCells[0].RowIndex].DataBoundItem as pts_stockout_log;
     try
     {
         planData.listPlan.Clear();
         noplanData.listNoPlan.Clear();
         requestData.listRequestItem.Clear();
         planData.Search(new pts_plan {
             plan_cd = stockoutData.process_cd
         });
         noplanData.Search(new pts_noplan {
             noplan_cd = stockoutData.process_cd
         });
         requestData.Search(new pts_request_log {
             request_cd = stockoutData.process_cd
         }, false, false, false);
         UpdateProcessGrid();
     }
     catch (Exception ex)
     {
         CustomMessageBox.Error(ex.Message);
     }
 }
Exemple #2
0
 public StockOutLogForm()
 {
     InitializeComponent();
     itemData     = new pts_item();
     planData     = new pts_plan();
     userData     = new m_mes_user();
     stockData    = new pts_stock();
     noplanData   = new pts_noplan();
     desCode      = new pts_destination();
     issueCode    = new pts_issue_code();
     requestData  = new pts_request_log();
     stockoutData = new pts_stockout_log();
 }
Exemple #3
0
 public StockOutForm()
 {
     InitializeComponent();
     tc_Main.ItemSize = new Size(0, 1);
     supplierData     = new pts_supplier();
     printData        = new PrintItem();
     outData          = new OutputItem();
     itemData         = new pts_item();
     stockData        = new pts_stock();
     mUserData        = new m_mes_user();
     noplanData       = new pts_noplan();
     issueCode        = new pts_issue_code();
     stockOutData     = new pts_stockout_log();
     destinationData  = new pts_destination();
     listPrintItems   = new List <PrintItem>();
     listStock        = new List <pts_stock>();
     listNoPlan       = new List <pts_noplan>();
     listStockOut     = new List <pts_stockout_log>();
 }
        /// <summary>
        /// Open set list item with select cell
        /// </summary>
        /// <param name="RowIndex"></param>
        private void OpenSet(int RowIndex)
        {
            if (!CheckFields())
            {
                return;
            }
            DataGridViewRow dr = dgvMainStockOut.Rows[RowIndex];

            GetSetOptions(dr.Cells["order_number"].Value.ToString(), (double)dr.Cells["order_qty"].Value, (DateTime)dr.Cells["order_date"].Value);
            SearchLowItem(txtItemCode.Text, (double)dr.Cells["order_qty"].Value, dr.Cells["order_number"].Value.ToString());
            tc_StockOut.SelectedTab = tab_ItemSet;
            pts_stockout_log stockoutData = new pts_stockout_log();
            double           temp         = 0;

            for (int i = 0; i < dgvSetData.Rows.Count; i++)
            {
                temp = stockoutData.GetStockOutQty(dr.Cells["order_number"].Value.ToString(), dgvSetData.Rows[i].Cells["low_level_item"].Value.ToString());
                dgvSetData.Rows[i].Cells["stockout_qty"].Value = temp;
            }
            txtSetLowItem.Focus();
        }