private void GetSalesEnd() { SalesEndService service = new SalesEndService(); dgvSalesEnd.DataSource = null; dgvSalesEnd.DataSource = service.GetSalesEnd(); }
private void btnMOVE_Click(object sender, EventArgs e) { dgvSalesEnd.EndEdit(); int cnt = 0; //체크가 되었는지 확인 foreach (DataGridViewRow item in dgvSalesEnd.Rows) { if (Convert.ToBoolean(item.Cells[0].Value)) { cnt++; } } if (cnt == 1) { if (MessageBox.Show("마감처리 하시겠습니까?", "매출마감", MessageBoxButtons.YesNo) == DialogResult.Yes) { SalesEndState_VO vo = new SalesEndState_VO(); vo.SALES_WORK_ORDER_ID = dgvSalesEnd.CurrentRow.Cells[1].Value.ToString(); vo.SALES_COM_CODE = dgvSalesEnd.CurrentRow.Cells[3].Value.ToString(); vo.ITEM_CODE = dgvSalesEnd.CurrentRow.Cells[4].Value.ToString(); vo.SALES_DUEDATE = dgvSalesEnd.CurrentRow.Cells[6].Value.ToString(); vo.SALES_QTY = Convert.ToInt32(dgvSalesEnd.CurrentRow.Cells[7].Value); vo.SALES_TTL = Convert.ToInt32(dgvSalesEnd.CurrentRow.Cells[10].Value); SalesEndService service = new SalesEndService(); Message msg = service.SalesRecord(vo, LoginInfo.UserInfo.LI_NAME); if (msg.IsSuccess) { MessageBox.Show(msg.ResultMessage); this.DialogResult = DialogResult.OK; GetSalesEnd(); } else { MessageBox.Show(msg.ResultMessage); return; } } } else { MessageBox.Show("하나의 항목씩만 가능합니다."); return; } }
public void Search(object sender, EventArgs e) { try { string id = txtID.Text; string item = txtITEM.Text; string company = txtCompany.Text; SalesEndService service = new SalesEndService(); dgvSalesEnd.DataSource = null; dgvSalesEnd.DataSource = service.SearchSalesEnd(id, item, company); } catch (Exception err) { _logging = new LoggingUtility(this.Name, Level.Info, 30); } }
private void btnSalesCancel_Click(object sender, EventArgs e) { dgvSalesEndState.EndEdit(); int cnt = 0; foreach (DataGridViewRow item in dgvSalesEndState.Rows) { if (Convert.ToBoolean(item.Cells[0].Value)) { cnt++; } } if (cnt == 1) { if (MessageBox.Show("마감취소 하시겠습니까?", "마감취소", MessageBoxButtons.YesNo) == DialogResult.Yes) { SalesEndState_VO vo = new SalesEndState_VO(); vo.SALES_WORK_ORDER_ID = dgvSalesEndState.CurrentRow.Cells[1].Value.ToString(); vo.ITEM_CODE = dgvSalesEndState.CurrentRow.Cells[4].Value.ToString(); SalesEndService service = new SalesEndService(); Message msg = service.SalesCancel(vo, LoginInfo.UserInfo.LI_NAME); if (msg.IsSuccess) { MessageBox.Show(msg.ResultMessage); this.DialogResult = DialogResult.OK; GetSalesEndState(); } else { MessageBox.Show(msg.ResultMessage); return; } } } else { MessageBox.Show("하나의 항목씩만 가능합니다."); return; } }