Beispiel #1
0
        private BookingReceiptHeader PopulateReceiptHeader()
        {
            BookingReceiptHeader obj = new BookingReceiptHeader();

            obj.BookingNumber = _bookingXml.SelectSingleNode("booking/receiptheader/iswalkin/bookingnumber").InnerText;
            _bookingID        = GetIntValue(_bookingXml, "booking/receiptheader/@identity");
            obj.BookingID     = _bookingID;
            if (obj.BookingNumber != "")
            {
                obj.IsHomeReceipt     = 0;
                obj.HomeReceiptNumber = "";
            }
            else
            {
                obj.IsHomeReceipt     = 1;
                obj.HomeReceiptNumber = _bookingXml.SelectSingleNode("booking/receiptheader/ishomebooking/homeeceiptnumber").InnerText;;
            }
            obj.CustomerID = GetIntValue(_bookingXml, "booking/receiptheader/customerid");
            string             date      = _bookingXml.SelectSingleNode("booking/receiptheader/duedate").InnerText;
            DateTimeFormatInfo objFormat = new DateTimeFormatInfo();

            objFormat.ShortDatePattern = "dd-MM-yyyy";
            objFormat.DateSeparator    = "-";
            obj.DueDate  = Convert.ToDateTime(date.Substring(4), objFormat);
            obj.DueTime  = _bookingXml.SelectSingleNode("booking/receiptheader/duetime").InnerText;
            obj.IsUrgent = GetIntValue(_bookingXml, "booking/receiptheader/isurgent");
            obj.IsSMS    = GetIntValue(_bookingXml, "booking/receiptheader/issms");
            obj.IsEmail  = GetIntValue(_bookingXml, "booking/receiptheader/isemail");

            obj.ReceiptRemarks  = _bookingXml.SelectSingleNode("booking/receiptheader/remarks").InnerText;
            obj.SalesManUserID  = GetIntValue(_bookingXml, "booking/receiptheader/salesman");
            obj.CheckedByUserID = GetIntValue(_bookingXml, "booking/receiptheader/checkedby");
            obj.ReceiptStatus   = 1; //TODO - Change to Enum

            //Payment Details - TODO to be added in Payment Table
            obj.TotalGrossAmount = GetDoubleValue(_bookingXml, "booking/receiptheader/totalgrossamount");
            obj.TotalDiscount    = GetDoubleValue(_bookingXml, "booking/receiptheader/totaldiscount");
            obj.TotalTax         = GetDoubleValue(_bookingXml, "booking/receiptheader/totaltax");
            obj.TotalAdvance     = GetDoubleValue(_bookingXml, "booking/receiptheader/totaladvance");

            PopulateCommonFields(obj.CommonFields);

            return(obj);
        }
Beispiel #2
0
 private int SaveReceiptHeader(string bookingXml, BookingReceiptHeader bookingReceiptHeader)
 {
     return(DALFactory.Instance.DAL_Booking.SaveBookingData(bookingXml, bookingReceiptHeader));
 }
Beispiel #3
0
 public BookingReceipt()
 {
     _receiptHeader = new BookingReceiptHeader();
     _lineItems     = new List <BookingLineItem>();
 }