예제 #1
0
        private void SavePickListItems(object sender, EventArgs e)
        {
            BLL.Order       ord = new BLL.Order();
            BLL.Institution rus = new Institution();
            ord.LoadByPrimaryKey(_orderID);

            if (_dvPickListMakeup != null)
            {
                if (ValidatePickList())
                {
                    return;
                }
            }

            // if the pick list has already been printed ... go ahead and pass it to the next level
            if (ord.OrderStatusID == OrderStatus.Constant.PICK_LIST_GENERATED)
            {
                OrderDetail oDetail = new OrderDetail();
                oDetail.Where.OrderID.Value = ord.ID;
                oDetail.Query.Load();

                ord.ChangeStatus(OrderStatus.Constant.PICK_LIST_CONFIRMED, CurrentContext.UserId);
                this.LogActivity("Confirm-Pick-List", ord.ID);
                BindApprovedOrders();
                gridPickListDetail.DataSource = null;
                XtraMessageBox.Show("The Pick List has been Confirmed", "Confirmation", MessageBoxButtons.OK,
                                    MessageBoxIcon.Information);
                return;
            }
        }
예제 #2
0
        private void btnCancelPickList_Click(object sender, EventArgs e)
        {
            DataRow dr = gridApprovedOrdersView.GetFocusedDataRow();

            if (dr != null)
            {
                if (DialogResult.Yes == XtraMessageBox.Show(String.Format("Are you sure you want to cancel the Request: {0}?", dr["RefNo"]), "Confirm Cancelation!", MessageBoxButtons.YesNo, MessageBoxIcon.Question))
                {
                    int       ordID = Convert.ToInt32(dr["ID"]);
                    BLL.Order ord   = new BLL.Order();
                    ord.LoadByPrimaryKey(ordID);
                    ord.ChangeStatus(OrderStatus.Constant.CANCELED, CurrentContext.UserId);
                    if (BLL.Settings.IsCenter)
                    {
                        XtraMessageBox.Show("Issue Order List canceled", "Confirmation", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    }
                    else
                    {
                        XtraMessageBox.Show("Pick List canceled", "Confirmation", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    }

                    BindApprovedOrders();
                    gridPickListDetail.DataSource = null;
                }
            }
        }
예제 #3
0
 private void btnReturnToEdit_Click(object sender, EventArgs e)
 {
     if (XtraMessageBox.Show("Are you sure you would like to return this Order to the SDO?", "Confirmation", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == System.Windows.Forms.DialogResult.Yes)
     {
         ApprovalOrder.ChangeStatus(OrderStatus.Constant.DRAFT_WISHLIST, CurrentContext.UserId);
         ApprovalOrder.ApprovedBy = CurrentContext.UserId;
         //ApprovalOrder.Remark = NewMainWindow.LoggedInUserName;
         //gridOrderDetailForApproval.DataSource = null;
         ApprovalOrder.Save();
         this.LogActivity("Return-To-Edit", ApprovalOrder.ID);
         XtraMessageBox.Show("The requisition you selected has been sent back to the SDO", "Confirmation", MessageBoxButtons.OK, MessageBoxIcon.Information);
         BindOutstandingOrders();
     }
 }
예제 #4
0
        private void BtnCancelClicked(object sender, EventArgs e)
        {
            // cancel order from the approve order screen
            DataRow dr = gridViewOrder.GetFocusedDataRow();

            if (dr != null)
            {
                if (DialogResult.Yes ==
                    XtraMessageBox.Show(
                        String.Format("Are you sure you want to cancel the Request: {0}?", dr["RefNo"]),
                        "Confirm Cancelation!", MessageBoxButtons.YesNo, MessageBoxIcon.Question))
                {
                    //TOFIX: this could have been written in the business Logic
                    int       ordID = Convert.ToInt32(dr["ID"]);
                    BLL.Order ord   = new BLL.Order();
                    ord.LoadByPrimaryKey(ordID);
                    ord.ChangeStatus(OrderStatus.Constant.CANCELED, CurrentContext.UserId);
                    this.LogActivity("Cancel-Approval", ord.ID);
                    XtraMessageBox.Show("Request canceled", "Confirmation", MessageBoxButtons.OK,
                                        MessageBoxIcon.Information);
                    BindOutstandingOrders();
                }
            }
        }
        private void BtnCancelClicked(object sender, EventArgs e)
        {
            // cancel order from the approve order screen
            DataRow dr = gridViewOrder.GetFocusedDataRow();
            if (dr != null)
            {
                if (DialogResult.Yes ==
                    XtraMessageBox.Show(
                        String.Format("Are you sure you want to cancel the Request: {0}?", dr["RefNo"]),
                        "Confirm Cancelation!", MessageBoxButtons.YesNo, MessageBoxIcon.Question))
                {

                    //TOFIX: this could have been written in the business Logic
                    int ordID = Convert.ToInt32(dr["ID"]);
                    BLL.Order ord = new BLL.Order();
                    ord.LoadByPrimaryKey(ordID);
                    ord.ChangeStatus(OrderStatus.Constant.CANCELED,CurrentContext.UserId);
                    this.LogActivity("Cancel-Approval", ord.ID);
                    XtraMessageBox.Show("Request canceled", "Confirmation", MessageBoxButtons.OK,
                                        MessageBoxIcon.Information);
                    BindOutstandingOrders();
                }
            }
        }
        private void SavePickListItems(object sender, EventArgs e)
        {
            BLL.Order ord = new BLL.Order();
            BLL.Institution rus = new Institution();
            ord.LoadByPrimaryKey(_orderID);

            if (_dvPickListMakeup != null)
            {
                if (ValidatePickList()) return;
            }

            // if the pick list has already been printed ... go ahead and pass it to the next level
            if (ord.OrderStatusID == OrderStatus.Constant.PICK_LIST_GENERATED)
            {
                OrderDetail oDetail = new OrderDetail();
                oDetail.Where.OrderID.Value = ord.ID;
                oDetail.Query.Load();

                ord.ChangeStatus(OrderStatus.Constant.PICK_LIST_CONFIRMED,CurrentContext.UserId);
                this.LogActivity("Confirm-Pick-List", ord.ID);
                BindApprovedOrders();
                gridPickListDetail.DataSource = null;
                XtraMessageBox.Show("The Pick List has been Confirmed", "Confirmation", MessageBoxButtons.OK,
                                    MessageBoxIcon.Information);
                return;
            }
        }
        private void btnCancelPickList_Click(object sender, EventArgs e)
        {
            DataRow dr = gridApprovedOrdersView.GetFocusedDataRow();
            if (dr != null)
            {
                if (DialogResult.Yes == XtraMessageBox.Show(String.Format("Are you sure you want to cancel the Request: {0}?", dr["RefNo"]), "Confirm Cancelation!", MessageBoxButtons.YesNo, MessageBoxIcon.Question))
                {
                    int ordID = Convert.ToInt32(dr["ID"]);
                    BLL.Order ord = new BLL.Order();
                    ord.LoadByPrimaryKey(ordID);
                    ord.ChangeStatus(OrderStatus.Constant.CANCELED,CurrentContext.UserId);
                    if (BLL.Settings.IsCenter)
                    {
                        XtraMessageBox.Show("Issue Order List canceled", "Confirmation", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    }else
                    {
                        XtraMessageBox.Show("Pick List canceled", "Confirmation", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    }

                    BindApprovedOrders();
                    gridPickListDetail.DataSource = null;
                }
            }
        }