protected void btnCancelled_Click(object sender, EventArgs e) { if (hdnSelectedIDs.Value != "") { string[] arIDs = hdnSelectedIDs.Value.ToString().TrimEnd(',').Split(','); if (arIDs.Length > 0) { objSubOrder = new tblSubOrder(); objSubOrder.SetOrderStatus(Convert.ToInt32(Enums.Enums_OrderStatus.CancelledByAdmin), hdnSelectedIDs.Value.ToString().TrimEnd(','), GetCurrentDateTime().ToString()); objSubOrder.SetProductQty(hdnSelectedIDs.Value.ToString().TrimEnd(',')); objSubOrder = null; //for (int i = 0; i < arIDs.Length; i++) //{ // if (arIDs[i].ToString() != "") // { // SendMail(Convert.ToInt32(Enums.Enums_OrderStatus.CancelledByAdmin), arIDs[i].ToString()); // } //} DInfo.ShowMessage("Order status has been change ordered to Cancel status", Enums.MessageType.Successfull); hdnSelectedIDs.Value = ""; LoadDataGrid(true, false); } else { DInfo.ShowMessage("Order status has been change ordered to Cancel status", Enums.MessageType.Error); } } else { DInfo.ShowMessage("Select any one Order ", Enums.MessageType.Error); } }
protected void dgvCart_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandArgument.ToString() != "") { if (e.CommandName == "Cancel") { objSubOrder = new tblSubOrder(); objSubOrder.SetOrderStatus(Convert.ToInt32(Enums.Enums_OrderStatus.CancelledByCustomer), e.CommandArgument.ToString(), GetCurrentDateTime().ToString()); objSubOrder.SetProductQty(e.CommandArgument.ToString()); objSubOrder = null; LoadMyorderList(); } } }