private void btnSupport_Click(object sender, EventArgs e) { SupportSearchFlow csFlow = new SupportSearchFlow(); RequisitionData csData = new RequisitionData(); string str_today = getDateToday(); csData.REQUISITIONTYPE = Constz.Requisition.RequisitionType.REQ04; csData.STATUS = Constz.Requisition.Status.Waiting.Code; csData.REQDATE = Convert.ToDateTime(str_today); csData.WAREHOUSE = Appz.CurrentUserData.Warehouse; csData.RESERVEDATE = Convert.ToDateTime(str_today); csData.ACTIVE = Constz.ActiveStatus.Active; csData.VAT = Convert.ToDouble(ABB.Flow.SysConfigFlow.GetValue(Constz.ConfigName.VAT)); double loid; //insert Requisition loid = csFlow.InsertRequisition(Appz.CurrentUserData.UserID.ToString(), csData); frmsupportEdit = new Transaction.SupportEdit(loid); frmsupportEdit.MdiParent = this; frmsupportEdit.Show(); frmsupportEdit.Focus(); }
private void btnDelete_Click(object sender, EventArgs e) { bool ret = true; if (Appz.OpenQuestionDialog("µéͧ¡ÒÃźÃÒ¡ÒÃãªèËÃ×ÍäÁè?") == DialogResult.OK) { ArrayList arrLOID = new ArrayList(); ArrayList arr = new ArrayList(); SupportSearchFlow csFlow = new SupportSearchFlow(); for (int i = 0; i < grvSupportSearch.Rows.Count; i++) { DataGridViewCheckBoxCell maCell = (DataGridViewCheckBoxCell)this.grvSupportSearch.Rows[i].Cells["CHKAPPROVE"]; if (maCell.FormattedValue.Equals(true)) { RequisitionData dr = new RequisitionData(); arrLOID.Add(grvSupportSearch.Rows[i].Cells["RQLOID"].Value.ToString()); arr.Add(dr); } } ret = csFlow.DeleteReq_ReqItemData(arrLOID); if (ret == true) { Appz.OpenInformationDialog("źÃÒ¡ÒÃàÃÕºÃéÍÂ"); } else { Appz.OpenWarningDialog(csFlow.ErrorMessage); } LoadData(); } }
private void btnSubmit_Click(object sender, EventArgs e) { bool ret = true; if (Appz.OpenQuestionDialog("µéͧ¡ÒÃÊ觽èÒ¢ÒÂãªèËÃ×ÍäÁè?") == DialogResult.OK) { ArrayList arrLOID = new ArrayList(); ArrayList arr = new ArrayList(); SupportSearchFlow csFlow = new SupportSearchFlow(); for (int i = 0; i < grvSupportSearch.Rows.Count; i++) { DataGridViewCheckBoxCell maCell = (DataGridViewCheckBoxCell)this.grvSupportSearch.Rows[i].Cells["CHKAPPROVE"]; if (maCell.FormattedValue.Equals(true)) { RequisitionData dr = new RequisitionData(); arrLOID.Add(grvSupportSearch.Rows[i].Cells["RQLOID"].Value.ToString()); dr.ACTIVE = "1"; dr.STATUS = "AP"; arr.Add(dr); } } ret = csFlow.RequisitionApprove(Appz.CurrentUserData.UserID, arrLOID); if (ret == true) { Appz.OpenInformationDialog("Ê觽èÒ¢ÒÂàÃÕºÃéÍÂ"); } else { Appz.OpenWarningDialog(csFlow.ErrorMessage); } LoadData(); } }
private void btnNew_Click(object sender, EventArgs e) { if (Appz.OpenQuestionDialog("µéͧ¡ÒÃÊÃéÒ§ÃÒ¡ÒÃãËÁèãªèËÃ×ÍäÁè") == DialogResult.OK) { SupportSearchFlow csFlow = new SupportSearchFlow(); RequisitionData csData = new RequisitionData(); string str_today = getDateToday(); csData.REQUISITIONTYPE = Constz.Requisition.RequisitionType.REQ04; csData.STATUS = Constz.Requisition.Status.Waiting.Code; csData.REQDATE = Convert.ToDateTime(str_today); csData.WAREHOUSE = Appz.CurrentUserData.Warehouse; csData.RESERVEDATE = Convert.ToDateTime(str_today); csData.ACTIVE = Constz.ActiveStatus.Active; csData.VAT = Convert.ToDouble(ABB.Flow.SysConfigFlow.GetValue(Constz.ConfigName.VAT)); double loid; //insert Requisition loid = csFlow.InsertRequisition(Appz.CurrentUserData.UserID.ToString(), csData); if (loid == 0) MessageBox.Show(csFlow.ErrorMessage); else Openfrm(loid); LoadData(); } }