Пример #1
0
 private void cmdUser_Click(object sender, EventArgs e)
 {
     using (Solsage_Process_Management_System.Forms.VerifyUser frmVerify = new Solsage_Process_Management_System.Forms.VerifyUser())
     {
         if (frmVerify.ShowDialog() == DialogResult.OK)
         {
             txtUserName.Text = frmVerify.txtUserName.Text;
         }
     }
 }
Пример #2
0
 private void cmdSalesPerson_Click(object sender, EventArgs e)
 {
     using (Forms.VerifyUser frmVerify = new Solsage_Process_Management_System.Forms.VerifyUser())
     {
         if (frmVerify.ShowDialog() == DialogResult.OK)
         {
             txtSalesCode.Text = frmVerify.sUserCode;
         }
     }
 }
Пример #3
0
 private void picReturned_DoubleClick(object sender, EventArgs e)
 {
     using (Forms.VerifyUser frmVerify = new Solsage_Process_Management_System.Forms.VerifyUser())
     {
         if (frmVerify.ShowDialog() == DialogResult.OK)
         {
             if (Functions.getUserProfile(frmVerify.sUserCode).bCancelReturnItem)
             {
                 using (PsqlConnection oLiquidConnection = new PsqlConnection(Connect.sConnStr))
                 {
                     string sSalesOrder = ((Documents.SalesOrder)(this.Parent.Parent.Parent.Parent)).txtNumber.Text.ToUpper();
                     string sSql = "UPDATE SOLHL set Status = 0 where Header = '" + sSalesOrder + "' and LinkNum = " + sPastelLineLink;
                     int iRet = Connect.getDataCommand(sSql, oLiquidConnection).ExecuteNonQuery();
                     ((Documents.SalesOrder)(this.Parent.Parent.Parent.Parent)).loadSalesOrder(sSalesOrder);
                 }
             }
             else
             {
                 MessageBox.Show("Your user account does not allow you to cancel the returned item.  Please contact your manager.","Not Allowed",MessageBoxButtons.OK, MessageBoxIcon.Warning);
             }
         }
     }
 }
Пример #4
0
        private void cmdCloseOrder_Click(object sender, EventArgs e)
        {
            if (aSaleslines.Length > 0)
            {
                if (MessageBox.Show("Do you want to close this order? Note that this action cannot be reversed.", "Close Order?", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question) == DialogResult.Yes)
                {
                    using (Forms.VerifyUser frmVerify = new Solsage_Process_Management_System.Forms.VerifyUser())
                    {
                        if (frmVerify.ShowDialog() == DialogResult.OK)
                        {
                            if (Functions.getUserProfile(frmVerify.sUserCode).bCloseOrder)
                            {
                                Functions.CloseOrder(txtNumber.Text.Trim());
                                loadSalesOrder(txtNumber.Text);

                            }
                            else
                            {
                                MessageBox.Show("Your user account does not allow you to close sales orders.  Please contact your manager.", "Not Allowed", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                            }
                        }
                    }
                }
            }
            else
            {
                if (MessageBox.Show("There are no more lines, do you want to close this order? Note that this action cannot be reversed.", "Close Order?", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question) == DialogResult.Yes)
                {
                    Functions.CloseOrder(txtNumber.Text.Trim());
                    loadSalesOrder(txtNumber.Text);
                }

            }
        }