//=================FORM KE LOAD======================================== private void SearchArticle_Load(object sender, EventArgs e) { this.ActiveControl = t_find_article; t_find_article.Focus(); if (Properties.Settings.Default.OnnOrOff == "Offline") { //====HIT INVEN LOCAL========================== API_Inventory InvLocal = new API_Inventory(); InvLocal.SetInvHitLocal(); //============================================== //dataGridView1.Columns[0].HeaderCell.Style.ForeColor = Color.Orange; dgv_2.EnableHeadersVisualStyles = false; String sql = "SELECT TOP 100 * FROM article_ho"; get_load_data(sql); dgv_2.SelectionMode = DataGridViewSelectionMode.FullRowSelect; dgv_2.MultiSelect = true; } else { dgv_2.EnableHeadersVisualStyles = false; String sql = "SELECT TOP 100 * FROM article_ho"; get_load_data(sql); dgv_2.SelectionMode = DataGridViewSelectionMode.FullRowSelect; dgv_2.MultiSelect = true; } }
//===============FUNGSI SCAN BARCODE, JIKA ADA TAMPILKAN QTY SESUAI INVENTORY=========================== private void t_barcode_KeyPress(object sender, KeyPressEventArgs e) { try { if (e.KeyChar == (char)Keys.Enter) { updateInventArticle(); if (Properties.Settings.Default.OnnOrOff == "Offline") { //====HIT INVEN LOCAL========================== API_Inventory InvLocal = new API_Inventory(); InvLocal.SetInvHitLocal(); //============================================= cek_article();//fungsi memasukan data article ke dalam mutasi order line sesuai dengan scan barcode save_trans_header(); retreive(); qty(); t_barcode.Text = ""; } else { cek_article();//fungsi memasukan data article ke dalam mutasi order line sesuai dengan scan barcode save_trans_header(); retreive(); qty(); t_barcode.Text = ""; } } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
//============================LOAD FORM================================== private void RT_SearchArticle_Load(object sender, EventArgs e) { if (Properties.Settings.Default.OnnOrOff == "Offline") { //====HIT INVEN LOCAL========================== API_Inventory InvLocal = new API_Inventory(); InvLocal.SetInvHitLocal(); //============================================= } dgv_2.EnableHeadersVisualStyles = false; String sql = "select TOP 100 article._id,article.ARTICLE_ID, article.ARTICLE_NAME, size.Description as SIZE_ID, color.Description as COLOR_ID, article.PRICE, inventory.GOOD_QTY FROM article INNER JOIN inventory ON article._id = inventory.ARTICLE_ID INNER JOIN itemdimensioncolor color ON color.Id = article.COLOR_ID INNER JOIN itemdimensionsize size ON size.Id = article.SIZE_ID WHERE inventory.GOOD_QTY >=1"; get_load_data(sql); dgv_2.SelectionMode = DataGridViewSelectionMode.FullRowSelect; dgv_2.MultiSelect = true; }
//=========================FORM LOAD ========================================= private void RO_SearchArticle_Load(object sender, EventArgs e) { if (Properties.Settings.Default.OnnOrOff == "Offline") { //====HIT INVEN LOCAL========================== API_Inventory InvLocal = new API_Inventory(); InvLocal.SetInvHitLocal(); //============================================= dgv_2.EnableHeadersVisualStyles = false; String sql = "select TOP 100 article.ARTICLE_ID, article.ARTICLE_NAME, article.SIZE, article.COLOR, article.PRICE, inventory.GOOD_QTY FROM article INNER JOIN inventory ON article._id = inventory.ARTICLE_ID"; get_load_data(sql); dgv_2.SelectionMode = DataGridViewSelectionMode.FullRowSelect; dgv_2.MultiSelect = true; } else { dgv_2.EnableHeadersVisualStyles = false; String sql = "select TOP 100 article.ARTICLE_ID, article.ARTICLE_NAME, article.SIZE, article.COLOR, article.PRICE, inventory.GOOD_QTY FROM article INNER JOIN inventory ON article._id = inventory.ARTICLE_ID"; get_load_data(sql); dgv_2.SelectionMode = DataGridViewSelectionMode.FullRowSelect; dgv_2.MultiSelect = true; } }