Example #1
0
        protected void btnSaveCommand_Click(object sender, EventArgs e)
        {
            try
            {
                var ctlCommand = new COMMAND_BC();

                if (this.COMMAND != null && this.LIST_COMMAND_DETAIL.Count > 0)
                {
                    ctlCommand.InsertWithTransaction(COMMAND, LIST_COMMAND_DETAIL, ListAdminGH_FINAL);

                    // Gui mail sau khi tao lenh PH - GH thanh cong
                    SendMailAfterCreateCommand(LIST_COMMAND_DETAIL);

                    ResetAllSessionList();

                    TNotify.Toastr.Success("Create command PH - GH successfull", "Create command PH - GH", TNotify.NotifyPositions.toast_top_full_width, true);
                }
                else
                {
                    throw new Exception("Not have command detail");
                }
            }
            catch (Exception ex)
            {
                TNotify.Alerts.Danger(ex.Message, true);
            }

            Response.Redirect("CreateCommandPH_GH.aspx");
        }
Example #2
0
        public void LoadCommands()
        {
            var ctlCommand = new COMMAND_BC();
            var lstCommand = ctlCommand.SelectAllItems();

            grdCommand.DataSource = lstCommand;
            grdCommand.DataBind();
        }