예제 #1
0
        private void DisplayInfo(CSalesMaster sm, MySqlConnection conn)
        {
            lblOrderNo.InnerText = sm.Number;
            lblTransDate.Text    = sm.TransDate_ToString;
            //lblDelMode.Text = sm.DelModeName;

            lblPmtMode.Text = sm.PmtModeName;
            //lblPmtNo.Text = "";
            //lblPmtDate.Text = "";

            string sBillAddr = "";

            if (sm.LinkID > 0)
            {
                CPayment pmt = CSalesMaster.FetchPaymentRecord(conn, sm.LinkID);
                if (!pmt.isEmpty)
                {
                    lblPmtMode.Text = pmt.PaymentName;
                    //lblPmtNo.Text = pmt.Number;
                    //lblPmtDate.Text = pmt.TransDate_ToString;
                }
            }
            lblBillAddr.Text = sBillAddr;
            //lblDelAddr.Text = sm.Address;

            SalesDetailCollection col = sm.CollectionSalesDetail(true, conn);

            lvwOrder.DataSource = col;
            lvwOrder.DataBind();

            //lblDelFee.Text = sm.Charge_ToString;
            lblSubtotal.Text  = sm.Subtotal_ToString;
            lblCharge.Text    = "Charge";
            lblChargeAmt.Text = sm.Charge_ToString;
            lblTax.Text       = "Tax";
            lblTaxAmt.Text    = sm.Tax_ToString;
            lblTotal.Text     = sm.SalesTotal_ToString;
            //lblNotes.Text = sm.Notes;

            // List<CDeliveryLog> lst = CSalesMaster.ListOfDeliveryLogs(conn, sm.ID);
            //lvwDelLog.DataSource = lst;
            //lvwDelLog.DataBind();
        }
예제 #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                btnCheckout.Attributes["PayModeID"]   = "";
                btnCheckout.Attributes["PayModeName"] = "";

                CSalesMaster    sm   = ApplicationSession.SalesMaster;
                MySqlConnection conn = CMain.GetConnection(ApplicationSession.DBName);
                lvwOrder.DataSource = sm.CollectionSalesDetail(true, conn);
                lvwOrder.DataBind();

                lblSubtotal.Text      = sm.Subtotal_ToString;
                lblTaxName.Text       = (ApplicationSession.SalesType.TaxName == "") ? "Tax" : ApplicationSession.SalesType.TaxName;
                lblTaxAmt.Text        = sm.Tax_ToString;
                lblTotal.Text         = sm.SalesTotal_ToString;
                btnCheckout.InnerText = "PAY ";
                checkoutAmt.InnerText = sm.SalesTotal_ToString;
            }
        }