public DataSet ApprovalManagementGet()
        {
            DataSet dsApproval = new DataSet();

            using (SqlConnection Connection = new SqlConnection(ConfigurationManager.AppSettings["WebApplication"]))
            {
                using (SqlCommand Command = new SqlCommand("BonusPlan.ApprovalManagementGet", Connection))
                {
                    Command.CommandType    = CommandType.StoredProcedure;
                    Command.CommandTimeout = 600;

                    Command.Parameters.Add("@PaymentID", SqlDbType.Int);
                    Command.Parameters["@PaymentID"].Value = PaymentID.NullIfEmpty();

                    using (SqlDataAdapter DataAdapter = new SqlDataAdapter(Command))
                    {
                        DataAdapter.Fill(dsApproval);

                        if (dsApproval.HasRows())
                        {
                            BonusPlanID = dsApproval.Tables[0].Rows[0]["BonusPlanID"].ToString();
                        }
                    }
                }
            }

            return(dsApproval);
        }
        public void ApprovalManagementInsert()
        {
            using (SqlConnection Connection = new SqlConnection(ConfigurationManager.AppSettings["WebApplication"]))
            {
                using (SqlCommand Command = new SqlCommand("BonusPlan.ApprovalManagementInsert", Connection))
                {
                    Command.CommandType    = CommandType.StoredProcedure;
                    Command.CommandTimeout = 600;

                    Command.Parameters.Add("@PaymentID", SqlDbType.Int);
                    Command.Parameters["@PaymentID"].Value = PaymentID.NullIfEmpty();

                    Command.Parameters.Add("@BonusPlanID", SqlDbType.Int);
                    Command.Parameters["@BonusPlanID"].Value = BonusPlanID.NullIfEmpty();

                    Command.Parameters.Add("@UsernameAlternate", SqlDbType.VarChar);
                    Command.Parameters["@UsernameAlternate"].Value = UsernameAlternate.NullIfEmpty();

                    Command.Parameters.Add("@JobCategoryID", SqlDbType.Int);
                    Command.Parameters["@JobCategoryID"].Value = JobCategoryID.NullIfEmpty();

                    Command.Parameters.Add("@JobCategoryIDAlternate", SqlDbType.Int);
                    Command.Parameters["@JobCategoryIDAlternate"].Value = JobCategoryIDAlternate.NullIfEmpty();

                    Command.Parameters.Add("@Sort", SqlDbType.Int);
                    Command.Parameters["@Sort"].Value = Sort.NullIfEmpty();

                    Command.Parameters.Add("@ApproveFlg", SqlDbType.Int);
                    Command.Parameters["@ApproveFlg"].Value = ApproveFlg.NullIfEmpty();

                    Command.Parameters.Add("@DenyFlg", SqlDbType.Int);
                    Command.Parameters["@DenyFlg"].Value = DenyFlg.NullIfEmpty();

                    Command.Parameters.Add("@ExceptionFlg", SqlDbType.Int);
                    Command.Parameters["@ExceptionFlg"].Value = ExceptionFlg.NullIfEmpty();

                    Command.Parameters.Add("@ExceptionNote", SqlDbType.VarChar);
                    Command.Parameters["@ExceptionNote"].Value = ExceptionNote.NullIfEmpty();

                    Command.Parameters.Add("@AdministrationNote", SqlDbType.VarChar);
                    Command.Parameters["@AdministrationNote"].Value = AdministrationNote.NullIfEmpty();

                    Command.Parameters.Add("@OverrideFlg", SqlDbType.Int);
                    Command.Parameters["@OverrideFlg"].Value = OverrideFlg.NullIfEmpty();

                    Command.Parameters.Add("@CreateBy", SqlDbType.VarChar);
                    Command.Parameters["@CreateBy"].Value = Audit.CreateBy.NullIfEmpty();

                    Connection.Open();
                    Command.ExecuteNonQuery();
                }
            }
        }
Esempio n. 3
0
        public NewPayment(DataSet bankSystemDataSet)
        {
            InitializeComponent();
            creditsDV = new DataView(bankSystemDataSet.Tables["tableOfCredits"]);
            this.bankSystemDataSet = bankSystemDataSet;
            tb_paymentID.Text      = PaymentID.ToString();
            lb_debName.DataSource  = bankSystemDataSet.Tables["tableOfDebitors"];
            lb_debID.DataSource    = bankSystemDataSet.Tables["tableOfDebitors"];

            lb_CreditID.DataSource      = creditsDV;
            lb_creditAmount.DataSource  = creditsDV;
            lb_creditBalance.DataSource = creditsDV;
        }
Esempio n. 4
0
 public override int GetHashCode()
 {
     return((string.IsNullOrWhiteSpace(Tourist) ? 0 : Tourist.GetHashCode())
            ^ (string.IsNullOrWhiteSpace(Zeile) ? 0 : Zeile.GetHashCode())
            ^ (string.IsNullOrWhiteSpace(Bund) ? 0 : Bund.GetHashCode())
            ^ (string.IsNullOrWhiteSpace(Country) ? 0 : Country.GetHashCode())
            ^ (string.IsNullOrWhiteSpace(RefundID) ? 0 : RefundID.GetHashCode())
            ^ (string.IsNullOrWhiteSpace(CustomerVers) ? 0 : CustomerVers.GetHashCode())
            ^ (string.IsNullOrWhiteSpace(CustomerID) ? 0 : CustomerID.GetHashCode())
            ^ (string.IsNullOrWhiteSpace(PaymentID) ? 0 : PaymentID.GetHashCode())
            ^ (string.IsNullOrWhiteSpace(Attempt) ? 0 : Attempt.GetHashCode())
            ^ (string.IsNullOrWhiteSpace(TransactionID) ? 0 : TransactionID.GetHashCode())
            ^ (string.IsNullOrWhiteSpace(TransactionHistoryID) ? 0 : TransactionHistoryID.GetHashCode()));
 }
Esempio n. 5
0
        internal override bool isValid()
        {
            if (DatePaidFrom != DateTime.MinValue)
            {
                return(true);
            }

            if (DatePaidTo != DateTime.MinValue)
            {
                return(true);
            }

            int requiredFilterCount = PaymentID.NullSafeLength() +
                                      OrderID.NullSafeLength();


            if (requiredFilterCount != 0)
            {
                return(true);
            }

            throw new NetoRequestException("At least one filter is required in the GetPayment request");
        }
Esempio n. 6
0
        private void metroButton1_Click(object sender, EventArgs e)
        {
            //Create Word Application
            word.Application wordApp = new word.Application();
            wordApp.Visible = true;

            //Create the Document
            word.Document wordDoc = wordApp.Documents.Add();

            //Create the Heading Parahraph
            word.Paragraph wordPara = wordDoc.Paragraphs.Add();
            wordPara.Range.Text = "End of Shift Report";
            object styleName = "Intense Quote";

            wordPara.Range.set_Style(ref styleName);
            wordPara.Range.InsertParagraphAfter();

            //Create a New Paragraph
            word.Paragraph wordPara2 = wordDoc.Paragraphs.Add();
            wordPara2.Range.Text = "This Document Contains all the crucial information regarding the Total Sales made per Shift. This information includes the Total Sales Made in the Shift, Each Sale made, their payment type and amounts. The total Amount of Sales Made this shift is: " + lblTotalSalesMade.Text + " " + "The Total Revenue made today is: R" + lblRevenue.Text;
            object styleName2 = "Subtle Emphasis";

            wordPara2.Range.set_Style(ref styleName2);
            wordPara2.Range.InsertParagraphAfter();


            int    PaymentID;
            double PaumentAmount;
            string PaymentDate;
            double PaymentVAT;
            double AmountReceived;
            double Change;
            int    PaymentTypeID;
            string Description;
            string Type;

            SqlConnection sqlcon = new SqlConnection(Globals.ConnectionString);

            sqlcon.Open();
            string        cmd    = "SELECT PaymentID, PaymentAmount, PaymentDate, PaymentVAt, AmountReceived, Change, PaymentTypeID FROM Payment WHERE PaymentDate ='" + lblDate.Text + "'";
            SqlCommand    sqlcom = new SqlCommand(cmd, sqlcon);
            SqlDataReader dr     = sqlcom.ExecuteReader();

            if (dr.HasRows)
            {
                while (dr.Read())
                {
                    PaymentID      = Convert.ToInt32((dr["PaymentID"]));
                    PaumentAmount  = Convert.ToDouble((dr["PaymentAmount"]));
                    PaymentDate    = (dr["PaymentDate"].ToString());
                    PaymentVAT     = Convert.ToDouble((dr["PaymentVAt"]));
                    AmountReceived = Convert.ToDouble((dr["AmountReceived"]));
                    Change         = Convert.ToDouble((dr["Change"]));
                    PaymentTypeID  = Convert.ToInt32((dr["PaymentTypeID"]));

                    if (PaymentTypeID == 1)
                    {
                        Type = "Cash Sale";
                    }
                    else
                    {
                        Type = "Credit Card Sale";
                    }

                    Details = "Payment ID: " + PaymentID.ToString() + "\n" +
                              "Payment Amount: R" + PaumentAmount.ToString() + "\n" +
                              "Payment Date: " + PaymentDate.ToString() + "\n" +
                              "VAT: R" + PaymentVAT.ToString() + "\n" +
                              "Amount Received: R" + AmountReceived.ToString() + "\n" +
                              "Change: R" + Change.ToString() + "\n" +
                              "Payment Type: " + Type.ToString() + "\n";


                    word.Paragraph wordPara3  = wordDoc.Paragraphs.Add();
                    object         styleName3 = "List Paragraph";
                    wordPara3.Range.set_Style(ref styleName3);
                    wordPara3.Range.InsertParagraphAfter();
                    wordPara3.Range.Text = Details;
                }
            }

            dr.Close();
            sqlcon.Close();
        }