private void setStatusRequisition(string active,string status) { bool rt = true; ArrayList arr = new ArrayList(); ReturnSearchFlow csFlow = new ReturnSearchFlow(); RequisitionData dr = new RequisitionData(); dr.CODE = txtRqCode.Text.Trim(); dr.ACTIVE = active.ToString(); dr.STATUS = status.ToString(); arr.Add(dr); rt = csFlow.UpdateRequisition_Choose(Appz.CurrentUserData.UserID.ToString(), arr); }
private void btnDelete_Click(object sender, EventArgs e) { bool ret = true; bool rt = true; if (Appz.OpenQuestionDialog("µéͧ¡ÒÃźÃÒ¡ÒÃãªèËÃ×ÍäÁè?") == DialogResult.OK) { ArrayList arrLOID = new ArrayList(); ArrayList arr = new ArrayList(); ReturnSearchFlow csFlow = new ReturnSearchFlow(); for (int i = 0; i < grvReturnSearch.Rows.Count; i++) { DataGridViewCheckBoxCell maCell = (DataGridViewCheckBoxCell)this.grvReturnSearch.Rows[i].Cells["CHKAPPROVE"]; if (maCell.FormattedValue.Equals(true)) { RequisitionData dr = new RequisitionData(); arrLOID.Add(grvReturnSearch.Rows[i].Cells["SILOID"].Value.ToString()); // arr.Add(grvReturnSearch.Rows[i].Cells["RQCODE"].Value.ToString()); dr.CODE = grvReturnSearch.Rows[i].Cells["RQCODE"].Value.ToString(); dr.ACTIVE = "1"; dr.STATUS = "AP"; arr.Add(dr); } } ret = csFlow.DeleteStockIn_StockInitemData(Appz.CurrentUserData.UserID, arrLOID); if (ret == true) { rt = csFlow.UpdateRequisition_Choose(Appz.CurrentUserData.UserID.ToString(), arr); Appz.OpenInformationDialog("źÃÒ¡ÒÃàÃÕºÃéÍÂ"); } else { Appz.OpenWarningDialog(csFlow.ErrorMessage); } LoadData(); } }