Example #1
0
        public frmPay()
        {
            InitializeComponent();

            _orderService = new SaleOrderService();
            _log          = AppContext.Log;
        }
Example #2
0
        void consumer_Listener(IMessage message)
        {
            ITextMessage msg = (ITextMessage)message;

            //异步调用下,否则无法回归主线程
            if (message != null)
            {
                try
                {
                    DownMessage dm = Newtonsoft.Json.JsonConvert.DeserializeObject <DownMessage>(msg.Text);
                    if (dm != null)
                    {
                        switch (dm.actionKey)
                        {
                        case "ordersync":
                            SaleOrderService orderService = new SaleOrderService();
                            orderService.updateState(dm.objKey, OrderState.Synced.ToString());
                            break;
                        }
                    }
                }
                catch (JsonReaderException e)
                {
                    logger.Debug("MQCustomer listener parse JSON error:" + msg.Text);
                }
            }
        }
Example #3
0
        private void FrmDeposit_Load(object sender, EventArgs e)
        {
            try
            {
                if (_commonService == null)
                {
                    _commonService = ServiceFactory.GenerateServiceInstance().GenerateCommonService();
                }

                if (_depositService == null)
                {
                    _depositService = ServiceFactory.GenerateServiceInstance().GenerateDepositService();
                }

                if (_saleOrderService == null)
                {
                    _saleOrderService = ServiceFactory.GenerateServiceInstance().GenerateSaleOrderService();
                }

                InitializeDepositList();

                RetrieveDataHandler();
            }
            catch (Exception exception)
            {
                FrmExtendedMessageBox.UnknownErrorMessage(
                    Resources.MsgCaptionUnknownError,
                    exception.Message);
            }
        }
Example #4
0
 public frmUpload()
 {
     InitializeComponent();
     _syncService         = new SyncService(AppContext.Log);
     _saleService         = new SaleOrderService();
     _workScheduleService = new WorkScheduleService();
 }
Example #5
0
        public ActionResult Edit(Guid id)
        {
            ViewBag.EmployeeList = EmployeeService.FindNormalList();

            var model = SaleOrderService.Get(id);

            return(View("Edit", model));
        }
Example #6
0
        public ActionResult GetEditModel(Guid Id)
        {
            ViewBag.EmployeeList = EmployeeService.FindNormalList();

            var model = SaleOrderService.GetModel(Id);

            return(new BetterJsonResult(model, true));
        }
 public FinanceOrderService(
     IFinanceOrderRepository financeOrderRepository,
     PurchaseService purchaseService,
     RepairOrderService repairOrderService,
     SaleOrderService saleOrderService) : base(financeOrderRepository)
 {
     this.FinanceOrderRepository = financeOrderRepository;
     this.PurchaseService        = purchaseService;
     this.RepairOrderService     = repairOrderService;
     this.SaleOrderService       = saleOrderService;
 }
Example #8
0
 public ActionResult Cancel(IList <Guid> idList)
 {
     try
     {
         SaleOrderService.CancelOrder(idList);
         return(new BetterJsonResult());
     }
     catch (Exception ex)
     {
         return(new BetterJsonResult(ex.Message));
     }
 }
Example #9
0
        public frmPos()
        {
            InitializeComponent();

            _saleOrderService    = new SaleOrderService();
            _productService      = new ProductService();
            _vipService          = new VipCardService();
            _vipProductService   = new VipProductService();
            _workScheduleService = new WorkScheduleService();
            // 添加班次信息
            _currentWork = _workScheduleService.GetWorking(ContextService.StoreId, ContextService.PosId);
        }
Example #10
0
 public ActionResult SettlementOrder(SaleSettlementModel model)
 {
     try
     {
         SaleOrderService.Settlement(model);
         return(new BetterJsonResult());
     }
     catch (Exception ex)
     {
         return(new BetterJsonResult(ex.Message));
     }
 }
Example #11
0
 public MainFormPresenter(MainForm view)
 {
     this.view            = view;
     this.orderService    = new SaleOrderService();
     this.productService  = new ProductService();
     this.keyBoardService = new KeyBoardService();
     init();
     view.ipAddressLabel.Text = "IP:" + GetAddressIP();
     view.logo.Text           = "ERP-MOS-" + SystemInfo.VERSION;
     SyncBackUtil.getInstance().startSyncThread(1 * 60 * 1000); //启动后台同步进程
     MessageListener.getInstance().startListener();             //启动mq队列监听
     NetCheckUtil.getInstance().startNetCheck(this);
 }
Example #12
0
        public ActionResult Save(SaleOrder model)
        {
            try
            {
                if (model.Id == Guid.Empty)
                {
                    model.CreatedById = base.CurrentUser.Id;
                }

                SaleOrderService.SaveOrUpdate(model);
                return(new BetterJsonResult());
            }
            catch (Exception ex)
            {
                return(new BetterJsonResult(ex.Message));
            }
        }
Example #13
0
 /// <summary>
 /// 构造函数
 /// </summary>
 public SaleOrderController()
 {
     this.saleOrderService       = new SaleOrderService();
     this.customerAddressService = new CustomerAddressService();
     this.customerService        = new CustomerService();
 }
Example #14
0
 public frmRefund()
 {
     InitializeComponent();
     _orderService = new SaleOrderService();
 }
 public OrderController()
 {
     soService = new SaleOrderService();
     poService = new PurchaseOrderService();
 }
Example #16
0
 /// <summary>
 /// 构造函数
 /// </summary>
 public DeliveryController()
 {
     this.purchaseService  = new PurchaseService();
     this.deliveryService  = new DeliveryService();
     this.saleOrderService = new SaleOrderService();
 }
Example #17
0
        private void RetrieveConfiguration()
        {
            try
            {
                SafeCrossCallBackDelegate safeCrossCallBackDelegate = null;

                if (pnlBody_Right.InvokeRequired)
                {
                    safeCrossCallBackDelegate = RetrieveConfiguration;
                }

                if (pnlBody_Right.InvokeRequired)
                {
                    Invoke(safeCrossCallBackDelegate);
                }
                else
                {
                    Thread.Sleep(100);

                    //Loading Service
                    pgbService.Value += 15;
                    _commonService    = ServiceFactory.GenerateServiceInstance().GenerateCommonService();
                    pgbService.Value += 15;
                    _saleOrderService = ServiceFactory.GenerateServiceInstance().GenerateSaleOrderService();
                    pgbService.Value += 15;
                    _productService   = ServiceFactory.GenerateServiceInstance().GenerateProductService();
                    pgbService.Value += 15;
                    _customerService  = ServiceFactory.GenerateServiceInstance().GenerateCustomerService();
                    pgbService.Value += 15;
                    _supplierService  = ServiceFactory.GenerateServiceInstance().GenerateSupplierService();
                    pgbService.Value += 15;
                    _expenseService   = ServiceFactory.GenerateServiceInstance().GenerateExpenseService();
                    pgbService.Value += 10;
                    _userService      = ServiceFactory.GenerateServiceInstance().GenerateUserService();

                    //Connecting to database
                    pgbGlobalConfig.Value += 50;
                    _commonService.InitializeGlobalConfiguration();
                    pgbGlobalConfig.Value += 50;

                    //Initializing workspace
                    pgbInitialization.Value += 30;
                    _commonService.InitializeWorkSpace();
                    pgbInitialization.Value += 30;
                    if (AppContext.Counter == null)
                    {
                        const string briefMsg  = "អំពីការចូលទៅក្នុងប្រព័ន្ឋ";
                        var          detailMsg = Resources.MsgCounterNotInitialize;
                        using (var frmMessageBox = new FrmExtendedMessageBox())
                        {
                            frmMessageBox.BriefMsgStr    = briefMsg;
                            frmMessageBox.DetailMsgStr   = detailMsg;
                            frmMessageBox.IsCanceledOnly = true;
                            frmMessageBox.ShowDialog(this);
                            Close();
                            return;
                        }
                    }
                    pgbInitialization.Value += 40;

                    //Loading configuration
                    pgbCustomizedConfig.Value += 80;
                    Visible = false;

                    using (var frmLogIn = new FrmLogIn())
                    {
                        frmLogIn.UserService = _userService;
                        if (frmLogIn.ShowDialog(this) == DialogResult.OK)
                        {
                            Visible = true;

                            var frmMain = new FrmMain();
                            ApplicationContext.MainForm = frmMain;

                            frmMain.CommonService    = _commonService;
                            frmMain.SaleOrderService = _saleOrderService;
                            frmMain.ProductService   = _productService;
                            frmMain.CustomerService  = _customerService;
                            frmMain.SupplierService  = _supplierService;
                            frmMain.ExpenseService   = _expenseService;
                            frmMain.UserService      = _userService;

                            _commonService.InitializeCustomizedConfiguration(frmLogIn.User);
                            pgbCustomizedConfig.Value += 20;

                            _commonService.InsertOperationLog(
                                AppContext.User.UserId,
                                int.Parse(Resources.OperationLogIn));

                            frmMain.Show();
                            Close();
                        }
                        else
                        {
                            ApplicationContext.ExitThread();
                        }
                    }
                }
            }
            catch (Exception exception)
            {
                const string briefMsg  = "អំពីការចូលទៅក្នុងប្រព័ន្ឋ";
                var          detailMsg = Resources.MsgConnectionLost;
                using (var frmMessageBox = new FrmExtendedMessageBox())
                {
                    frmMessageBox.BriefMsgStr    = briefMsg;
                    frmMessageBox.DetailMsgStr   = detailMsg;
                    frmMessageBox.IsCanceledOnly = true;
                    frmMessageBox.ShowDialog(this);
                    Close();
                }
            }
        }
    private void SendEmailCar(SaleOrderService pSaleOrderService)
    {
        MailMessage mailMessage = new MailMessage();

        mailMessage.From = new MailAddress(@"*****@*****.**");
        if (!Utility.IsSubAgent)
        {
            mailMessage.To.Add(new MailAddress(((Contact)Utility.Transaction.CurrentTransactionObject.GetContacts()[0]).Person.Email));
        }
        else
        {
            mailMessage.To.Add(new MailAddress(Utility.Transaction.Member.EmailAddress));
        }
        mailMessage.IsBodyHtml = true;
        if (Utility.IsSubAgent)
        {
            mailMessage.Subject = ordersaveingresult.CaseNumber + "(B2B - Preliminary Confirmation)";
        }
        else
        {
            mailMessage.Subject = ordersaveingresult.CaseNumber + "(B2C - Preliminary Confirmation)";
        }
        string strEmail = string.Empty;

        string css = @"<style type='text/css'>";
        css += @"<!--";
        css += @"table.T_table   { font-size: 14px; line-height: 19px; color: #000000; font-family: Verdana;}";
        css += @"table.T_step0l   { background: #FD4C00; border: 0;}";
        css += @"table.T_step02   { border-top:solid #999999 1px; border-bottom:solid #999999 1px; border-left:solid #999999 1px; border-right:solid #999999 1px; border:1;}";
        css += @"table.T_step03   { border-top:solid #CCCCCC 1px; border-bottom:solid #CCCCCC 1px; border-left:solid #CCCCCC 1px; border-right:solid #CCCCCC 1px; border:1;}";
        css += @"tr.R_step01  { background-image: url(../images/bg_s01.gif); font-size: 10px; line-height: 12px; color: #FFFFFF; font-family: Verdana; font-weight: bold;}";
        css += @"tr.R_step02  { background: #EAEAEA;}";
        css += @"tr.R_step03  { background-image: url(../images/bg_s03.gif); font-size: 11px; line-height: 13px; color: #FFFFFF; font-family: Verdana; font-weight: bold;}";
        css += @"tr.R_step04  { background-image: url(../images/bg_s04.gif);}";
        css += @"tr.R_stepbox  { background: #FFFFFF; font-size: 9px; line-height: 12px; color: #000000; font-family: Verdana;}";
        css += @"td.D_stepto  { background: #FFFFFF; font-size: 9px; line-height: 12px; color: #F85000; font-family: Verdana;}";
        css += @"td.D_steptf  { background: #FFFFFF; font-size: 9px; line-height: 12px; color: #777777; font-family: Verdana;}";
        css += @"td.D_stepon  { background: #F85000;}";
        css += @"td.D_stepof  { background: #CCCCCC;}";
        css += @"tr.R_stepw  { background: #FFFFFF;}";
        css += @"tr.R_stepg  { background: #E9E9E9;}";
        css += @"tr.R_stepo  { background: #FDF1C1;}";
        css += @"td.D_stepb  { color: #FF6600; font-family: Verdana; font-weight: bold;}";
        css += @"td.D_stepr  { color:#000000; font-size: 16px; line-height: 20px; font-family: Verdana; font-weight: bold;}";
        css += @"td.D_stepg  { color:#000000; font-size: 9px; line-height: 18px; font-family: Verdana;}";
        css += @"td.D_stepl  { background: #CCCCCC;}";
        css += @"tr.R_order  { background: #EEEEEE; height: 25; color: #000000; font-family: Verdana; font-weight: bold;}";
        css += @"tr.R_order03  { background: #FF3300; height: 25; color: #FFFFFF; font-family: Verdana; font-weight: bold;}";
        css += @"tr.R_order01  { background-color: #FFFFFF; height: 25;}";
        css += @"tr.R_order02  { background-color: #E9E9E9; height: 25;}";
        css += @".t01{ color:#FF3300; font-size: 10px; line-height: 14px; font-family: Verdana;}";
        css += @".t02{ color:#FF3300; font-size: 11px; line-height: 16px; font-family: Verdana; font-weight: bold;}";
        css += @".t03{ color:#FFFFFF; font-size: 11px; line-height: 16px; font-family: Verdana; font-weight: bold;}";
        css += @".t04{ color:#000000; font-size: 9px; line-height: 16px; font-family: Verdana;}";
        css += @".t05{ color:#CC0000; font-size: 11px; line-height: 16px; font-family: Verdana; font-weight: bold;}";
        css += @".t06{ color:#000000; font-size: 14px; line-height: 16px; font-family: Verdana; font-weight: bold;}";
        css += @".t07{ color:#FF3300; font-size: 10px; line-height: 14px; font-family: Verdana; font-weight: bold;}";
        css += @".t08{ color:#000000; font-size: 9px; line-height: 16px; font-family: Verdana;}";
        css += @".t09  { color:#000000; font-size: 16px; line-height: 20px; font-family: Verdana; font-weight: bold;}";
        css += @".t10  { color:#005599; font-size: 16px; line-height: 20px; font-family: Verdana; font-weight: bold;}";
        css += @".head06{ color:#FF3300; font-size: 16px; line-height: 20px; font-family: Verdana; font-weight: bold;}";
        css += @"a.d07 {   color: #0000EE; text-decoration: underline; font-family: Verdana;}";
        css += @"a.d07:hover {  color: #0000EE; text-decoration: none; font-family: Verdana;}";
        css += @"input {margin: 1px 1px 1px 1px; font-size: 16px; font-family:Verdana, Arial, Helvetica, sans-serif;}";
        css += @"-->";
        css += @"</style>";

        Utility.Transaction.EmailVersion = Utility.Transaction.EmailVersion.Replace("$OrderNumber", ordersaveingresult.CaseNumber);
        Utility.Transaction.EmailVersion = Utility.Transaction.EmailVersion.Replace("$Confirmationnumber", ((VehcileOrderItem)Utility.Transaction.CurrentTransactionObject.Items[0]).BookingId);

        mailMessage.Body = css + Utility.Transaction.EmailVersion;

        #if DEBUG
        try
        {
            using (StreamWriter sw = File.CreateText("c:\\OrderEmail\\B2BTourEmail.html"))
            {
                sw.Write(mailMessage.Body);
            }
        }
        catch
        {
            //防止未注释被XXX暴头
        }
        #endif
        if (!Utility.IsSubAgent)
        {
            Terms.Member.Utility.MemberUtility.SendEmail(mailMessage, "Car");
        }
        else
        {
            Terms.Member.Utility.MemberUtility.SendEmail(mailMessage, "B2BCar");
        }
    }
    private void SendEmail(SaleOrderService pSaleOrderService)
    {
        MailMessage mailMessage = new MailMessage();

        mailMessage.From = new MailAddress(@"*****@*****.**");
        if (!Utility.IsSubAgent)
        {
            mailMessage.To.Add(new MailAddress(((Contact)Utility.Transaction.CurrentTransactionObject.GetContacts()[0]).Person.Email));
        }
        else
        {
            mailMessage.To.Add(new MailAddress(Utility.Transaction.Member.EmailAddress));
        }
        mailMessage.IsBodyHtml = true;
        if (Utility.IsSubAgent)
        {
            mailMessage.Subject = ordersaveingresult.CaseNumber + "(B2B - Preliminary Confirmation)";
        }
        else
        {
            mailMessage.Subject = ordersaveingresult.CaseNumber + "(B2C - Preliminary Confirmation)";
        }
        string strEmail = string.Empty;
        if (Utility.Transaction.CurrentSearchConditions is Terms.Sales.Business.TourSearchCondition)
        {
            Contact contact = (Contact)Utility.Transaction.CurrentTransactionObject.GetContacts()[0];
            strEmail = Utility.Transaction.EmailVersion;
            strEmail = strEmail.Replace("$ORDERNUMBER", ordersaveingresult.CaseNumber);
            strEmail = strEmail.Replace("$NAME",contact.Person.FirstName + " " + contact.Person.MiddleName + " " + contact.Person.LastName);
            strEmail = strEmail.Replace("$EMAIL",contact.Person.Email);
            strEmail = strEmail.Replace("$STREET",contact.Person.Address[0].AddressString);
            strEmail = strEmail.Replace("$STATECITY",contact.Person.Address[0].City.Name);
            strEmail = strEmail.Replace("$ZIP",contact.Person.Address[0].ZipCode);
            strEmail = strEmail.Replace("$FAX",contact.Person.Faxes[0].Number);
            strEmail = strEmail.Replace("$DAYPHONE",contact.Person.GetPhone(TERMS.Common.ContactOptions.DayTime).Number);
            strEmail = strEmail.Replace("$EVENINGPHONE",contact.Person.GetPhone(TERMS.Common.ContactOptions.NightTime).Number);

            mailMessage.Body = strEmail;
        }
        else
        {
            const string CASENUMBER_TEMP = "<SPAN id=\"SendEmailViewControl1_lblCaseNumber\"></SPAN>";
            const string RECORDLOCATOR_TEMP = "<SPAN id=\"SendEmailViewControl1_lblRcordLocator\"></SPAN>";

            Utility.Transaction.EmailVersion = Utility.Transaction.EmailVersion.Replace("<span id=\"SendEmailViewControl1_lblCaseNumber\"></span>", CASENUMBER_TEMP);
            Utility.Transaction.EmailVersion = Utility.Transaction.EmailVersion.Replace("<span id=\"SendEmailViewControl1_lblRcordLocator\"></span>", RECORDLOCATOR_TEMP);

            string CASENUMBER_FINAL = "<SPAN id=\"SendEmailViewControl1_lblCaseNumber\">" + ordersaveingresult.CaseNumber + "</SPAN>";
            string RECORDLOCATOR_FINAL = "<SPAN id=\"SendEmailViewControl1_lblRcordLocator\">" + ordersaveingresult.RcordLocator + "</SPAN>";

            Utility.Transaction.EmailVersion = Utility.Transaction.EmailVersion.Replace(CASENUMBER_TEMP, CASENUMBER_FINAL);
            Utility.Transaction.EmailVersion = Utility.Transaction.EmailVersion.Replace(RECORDLOCATOR_TEMP, RECORDLOCATOR_FINAL);

            //string strGTANUMBER = string.Empty;

            //if (pSaleOrderService.MyHotelOrderItem != null && pSaleOrderService.MyHotelOrderItem.Count > 0)
            //{

            //    for (int i = 0; i < pSaleOrderService.MyHotelOrderItem.Count; i++)
            //    {
            //        HotelOrderItem hotel = pSaleOrderService.MyHotelOrderItem[i];

            //        if (hotel.Profile.GetParam("DATASOURCE").ToString().ToUpper() == "GTA")
            //        {
            //            strGTANUMBER = "(" + hotel.Profile.GetParam("TOKEN").ToString() + ")";
            //        }
            //    }
            //}

            Utility.Transaction.EmailVersion = Utility.Transaction.EmailVersion.Replace("$GTANUMBER", ordersaveingresult.ExternalBookingId);

            mailMessage.Body = strEmail + Utility.Transaction.EmailVersion + "<BR>" + "<div class='under_rules'>" + this.Transaction.TermsConditions + "</div>";
        }

        mailMessage.Body.Replace("$ORDERNUMBER", ordersaveingresult.CaseNumber);

        #if DEBUG
            try
            {
                using (StreamWriter sw = File.CreateText("c:\\OrderEmail\\B2BTourEmail.html"))
                {
                    sw.Write( mailMessage.Body);
                }
            }
            catch
            {
                //防止未注释被XXX暴头
            }
        #endif
        if (Utility.IsSubAgent)
        {
            if (Utility.Transaction.Member.Source.Trim().ToUpper() == "Subagent".Trim().ToUpper())
            {
                string strbrach = Utility.Transaction.Member.AccountCode.Trim().ToUpper();

                if (strbrach.Length >= 3)
                {
                    strbrach = strbrach.Substring(strbrach.Length - 3);
                }

                //string strbrach = Utility.Transaction.Member.Branch.Replace("GTT", "").Trim().ToUpper();

                string emailPath = string.Empty;

                emailPath = string.Empty;

                emailPath = ConfigurationSettings.AppSettings.Get("BranchEmail");

                if (String.IsNullOrEmpty(emailPath))
                {
                    emailPath = @"/Config/BranchEmail.xml";
                }

                if (File.Exists(System.AppDomain.CurrentDomain.BaseDirectory + emailPath))
                {
                    DataSet ds = new DataSet();
                    ds.ReadXml(System.AppDomain.CurrentDomain.BaseDirectory + emailPath);

                    if (ds.Tables[strbrach] != null)
                    {
                        for (int i = 0; i < ds.Tables[strbrach].Rows.Count; i++)
                        {
                            if (ds.Tables[strbrach].Rows[i]["cc"] != null && ds.Tables[strbrach].Rows[i]["cc"].ToString().Trim().Length > 0)
                            {
                                mailMessage.CC.Add(ds.Tables[strbrach].Rows[i]["cc"].ToString());
                            }
                            if (ds.Tables[strbrach].Rows[i]["bcc"] != null && ds.Tables[strbrach].Rows[i]["bcc"].ToString().Trim().Length > 0)
                            {
                                mailMessage.Bcc.Add(ds.Tables[strbrach].Rows[i]["bcc"].ToString());
                            }
                        }
                    }
                }

                emailPath = ConfigurationSettings.AppSettings.Get("Email");

                if (String.IsNullOrEmpty(emailPath))
                {
                    emailPath = @"/Config/Email.xml";
                }

                if (File.Exists(System.AppDomain.CurrentDomain.BaseDirectory + emailPath))
                {
                    DataSet ds = new DataSet();
                    ds.ReadXml(System.AppDomain.CurrentDomain.BaseDirectory + emailPath);

                    if (ds.Tables["WESTBANK"] != null && ds.Tables["NOWESTBANK"] != null)
                    {
                        for (int i = 0; i < ds.Tables["WESTBANK"].Rows.Count; i++)
                        {
                            if (ds.Tables["WESTBANK"].Rows[i]["AccountCode"].ToString().Trim().Contains(strbrach))
                            {
                                if (ds.Tables["WESTBANK"].Rows[i]["bcc"] != null)
                                {
                                    List<string> emails = new List<string>();

                                    emails.AddRange(ds.Tables["WESTBANK"].Rows[i]["bcc"].ToString().Split(new char[] { ';' }));

                                    for (int xx = 0; xx < emails.Count; xx++)
                                    {
                                        mailMessage.Bcc.Add(emails[xx]);
                                    }
                                }
                            }
                            else
                            {
                                if (ds.Tables["NOWESTBANK"].Rows[i]["bcc"] != null)
                                {
                                    List<string> emails = new List<string>();

                                    emails.AddRange(ds.Tables["NOWESTBANK"].Rows[i]["bcc"].ToString().Split(new char[] { ';' }));

                                    for (int xx = 0; xx < emails.Count; xx++)
                                    {
                                        mailMessage.Bcc.Add(emails[xx]);
                                    }
                                }
                            }
                        }
                    }
                }
            }

            if (Utility.Transaction.CurrentSearchConditions is Terms.Sales.Business.HotelSearchCondition)
            {
                Terms.Member.Utility.MemberUtility.SendEmail(mailMessage, "B2BHotel", Utility.Transaction.Member.Handler);
            }
            if (Utility.Transaction.CurrentSearchConditions is Terms.Sales.Business.AirSearchCondition)
            {
                Terms.Member.Utility.MemberUtility.SendEmail(mailMessage, "B2BAir", Utility.Transaction.Member.Handler);
            }
            if (Utility.Transaction.CurrentSearchConditions is Terms.Sales.Business.PackageSearchCondition)
            {
                Terms.Member.Utility.MemberUtility.SendEmail(mailMessage, "B2BPackage", Utility.Transaction.Member.Handler);
            }
            if (Utility.Transaction.CurrentSearchConditions is Terms.Sales.Business.TourSearchCondition)
            {
                //Terms.Member.Utility.MemberUtility.SendEmail(mailMessage, "B2BTour", Utility.Transaction.Member.Handler);

                if (((Terms.Sales.Business.TourSearchCondition)Utility.Transaction.CurrentSearchConditions).Region.Trim().ToUpper() == "U.S.")
                {
                    Terms.Member.Utility.MemberUtility.SendEmail(mailMessage, "B2BTourUS", Utility.Transaction.Member.Handler);
                }
                else
                {
                    Terms.Member.Utility.MemberUtility.SendEmail(mailMessage, "B2BTourOther", Utility.Transaction.Member.Handler);
                }
            }
        }
        else
        {
            if (Utility.Transaction.CurrentSearchConditions is Terms.Sales.Business.HotelSearchCondition)
            {
                Terms.Member.Utility.MemberUtility.SendEmail(mailMessage, "Hotel");
            }
            if (Utility.Transaction.CurrentSearchConditions is Terms.Sales.Business.AirSearchCondition)
            {
                Terms.Member.Utility.MemberUtility.SendEmail(mailMessage, "Air");
            }
            if (Utility.Transaction.CurrentSearchConditions is Terms.Sales.Business.PackageSearchCondition)
            {
                Terms.Member.Utility.MemberUtility.SendEmail(mailMessage, "Package");
            }
            if (Utility.Transaction.CurrentSearchConditions is Terms.Sales.Business.TourSearchCondition)
            {
                //Terms.Member.Utility.MemberUtility.SendEmail(mailMessage, "Tour");

                if (((Terms.Sales.Business.TourSearchCondition)Utility.Transaction.CurrentSearchConditions).Region.Trim().ToUpper() == "U.S.")
                {
                    Terms.Member.Utility.MemberUtility.SendEmail(mailMessage, "B2CTourUS");
                }
                else
                {
                    Terms.Member.Utility.MemberUtility.SendEmail(mailMessage, "B2CTourOther");
                }
            }
        }
        //Terms.Member.Utility.MemberUtility.SendEmail(mailMessage, "B2C");
    }
Example #20
0
 public PayListCommand(Boolean showPayDialog, String typeCode)
 {
     this.showPayDialog = showPayDialog;
     this.typeCode      = typeCode;
     saleOrderService   = new SaleOrderService();
 }
Example #21
0
 public SaleController(SaleOrderService saleOrderService, EmployeeService employeeService)
 {
     this.SaleOrderService = saleOrderService;
     this.EmployeeService  = employeeService;
 }
Example #22
0
 public RemoveOrderDetailCommand()
 {
     saleOrderService = new SaleOrderService();
 }
Example #23
0
 public HoldOrderCommand()
 {
     saleOrderService = new SaleOrderService();
 }
Example #24
0
    private void SendEmail(SaleOrderService pSaleOrderService)
    {
        MailMessage mailMessage = new MailMessage();

        mailMessage.From = new MailAddress(@"*****@*****.**");
        mailMessage.To.Add(new MailAddress(((Contact)Utility.Transaction.CurrentTransactionObject.GetContacts()[0]).Person.Email));
        mailMessage.IsBodyHtml = true;
        mailMessage.Subject = pSaleOrderService.CaseNumber + "(B2C - Preliminary Confirmation)";

        string strEmail = "<div align=center><table border='0' cellpadding='0' style='width: 525pt' width='700'><tr>";
        strEmail += "<td style='padding-right: 0.75pt; padding-left: 0.75pt; padding-bottom: 0.75pt; padding-top: 0.75pt'>";
        strEmail += "<p align='center' style='text-align: center'><em><b><i><font face='Arial' size='4'>";
        strEmail += "<span lang='EN-US' style='font-weight: bold; font-size: 13.5pt; font-family: Arial'>";
        strEmail += "Some portions of your order are not confirmed yet.</span></font></i></b></em><b><font face='Arial' size='4'>";
        strEmail += "<span lang='EN-US' style='font-weight: bold; font-size: 13.5pt; font-family: Arial'><br /></span></font></b><b>";
        strEmail += "<font face='Arial' size='2'><span lang='EN-US' style='font-weight: bold; font-size: 10pt; font-family: Arial'>";
        strEmail += "The confirmation e-mail will be sent out within 3 business days.<br />";
        strEmail += "If you do not hear back from us within 3 business days, pls call us at 1-(888)-288-7528.</span></font></b></p></td></tr></table></div>";
        strEmail += "<table bgcolor='white' border='0' cellpadding='0' cellspacing='0' style='background: white; width: 100%' width='100%'>";
        strEmail += "<tr><td bgcolor='#edf1fa' colspan='2' style='padding-right: 0cm; padding-left: 0cm; background: #edf1fa; padding-bottom: 0cm; padding-top: 0cm'>";
        strEmail += "<h2><b><font color='Black' face='Arial' size='1'><span lang='EN-US' style='font-size: 9pt; font-family: Arial'>Order - ";
        if (Utility.Transaction.CurrentSearchConditions is Terms.Sales.Business.HotelSearchCondition)
        {
            strEmail += "Hotel Only";
        }
        if (Utility.Transaction.CurrentSearchConditions is Terms.Sales.Business.AirSearchCondition)
        {
            strEmail += "Flight Only";
        }
        if (Utility.Transaction.CurrentSearchConditions is Terms.Sales.Business.PackageSearchCondition)
        {
            strEmail += "Package (Flight + Hotel)";
        }

        strEmail += "</span></font></b></h2><p ><b><font face='Arial' size='1'>";
        strEmail += "<span lang='EN-US' style='font-weight: bold; font-size: 9pt; font-family: Arial'>&nbsp;Order was placed on: ";
        strEmail += "<span id='EC_lbOrderDateTime'> " + DateTime.Now.ToString("MM dd,yyyy hh:mm:ss", System.Globalization.DateTimeFormatInfo.InvariantInfo) + "</span> Eastern Time </span></font></b></p></td></tr><tr>";
        strEmail += "<td bgcolor='#edf1fa' style='padding-right: 0cm; padding-left: 0cm; background: #edf1fa; padding-bottom: 0cm; width: 46%; padding-top: 0cm' width='46%'>";
        strEmail += "<p ><b><font face='Arial' size='1'><span lang='EN-US' style='font-weight: bold; font-size: 9pt; font-family: Arial'>&nbsp;Booking ID: ";
        strEmail += "<span id='EC_BookingID'>" + pSaleOrderService.CaseNumber + "</span></span></font></b></p></td>";
        strEmail += "<td bgcolor='#edf1fa' style='padding-right: 0cm; padding-left: 0cm; background: #edf1fa; padding-bottom: 0cm; width: 54%; padding-top: 0cm' width='54%'>";
        strEmail += "<p ><b><font face='Arial' size='1'><span lang='EN-US' style='font-weight: bold; font-size: 9pt; font-family: Arial'>";
        if (string.IsNullOrEmpty(pSaleOrderService.RcordLocator))
        {
            strEmail += "Confirmation: N/A </span></font></b></p></td></tr></table>";
        }
        else
        {
            strEmail += "Confirmation: " + pSaleOrderService.RcordLocator + " </span></font></b></p></td></tr></table>";
        }

        mailMessage.Body = strEmail + flagSearch.Value;

        Terms.Member.Utility.MemberUtility.SendEmail(mailMessage, "B2C");
    }
Example #25
0
 private SyncBackUtil()
 {
     service = new SaleOrderService();
 }
Example #26
0
    private void SendEmail(SaleOrderService pSaleOrderService)
    {
        MailMessage mailMessage = new MailMessage();

        mailMessage.From = new MailAddress(@"*****@*****.**");
        mailMessage.To.Add(new MailAddress(Utility.Transaction.CurrentTransactionObject.GetContacts()[0].Person.Email));
        mailMessage.IsBodyHtml = true;
        mailMessage.Subject = pSaleOrderService.CaseNumber + "(B2C - Preliminary Confirmation)";

        string strEmail = "<style type='text/css'>";
        strEmail += "table.T_table   { font-size: 14px; line-height: 19px; color: #000000; font-family: Verdana;}";
        strEmail += "table.T_step0l   { background: #FD4C00; border: 0;}";
        strEmail += "table.T_step02   { background: #999999; border: 0;}";
        strEmail += "table.T_step03   { background: #CCCCCC; border: 0;}";
        strEmail += "tr.R_step01  { background-image: url(../images/bg_s01.gif); font-size: 10px; line-height: 12px; color: #FFFFFF; font-family: Verdana; font-weight: bold;}";
        strEmail += "tr.R_step02  { background: #EAEAEA;}";
        strEmail += "tr.R_step03  { background-image: url(../images/bg_s03.gif); font-size: 11px; line-height: 13px; color: #FFFFFF; font-family: Verdana; font-weight: bold;}";
        strEmail += "tr.R_step04  { background-image: url(../images/bg_s04.gif);}";
        strEmail += "tr.R_stepbox  { background: #FFFFFF; font-size: 9px; line-height: 12px; color: #000000; font-family: Verdana;}";
        strEmail += "td.D_stepto  { background: #FFFFFF; font-size: 9px; line-height: 12px; color: #F85000; font-family: Verdana;}";
        strEmail += "td.D_steptf  { background: #FFFFFF; font-size: 9px; line-height: 12px; color: #777777; font-family: Verdana;}";
        strEmail += "td.D_stepon  { background: #F85000;}";
        strEmail += "td.D_stepof  { background: #CCCCCC;}";
        strEmail += "tr.R_stepw  { background: #FFFFFF;}";
        strEmail += "tr.R_stepg  { background: #E9E9E9;}";
        strEmail += "tr.R_stepo  { background: #FDF1C1;}";
        strEmail += "td.D_stepb  { color: #FF6600; font-family: Verdana; font-weight: bold;}";
        strEmail += "td.D_stepr  { color:#000000; font-size: 16px; line-height: 20px; font-family: Verdana; font-weight: bold;}";
        strEmail += "td.D_stepg  { color:#000000; font-size: 9px; line-height: 18px; font-family: Verdana;}";
        strEmail += "td.D_stepl  { background: #CCCCCC;}";
        strEmail += "tr.R_order  { background: #EEEEEE; height: 25; color: #000000; font-family: Verdana; font-weight: bold;}";
        strEmail += "tr.R_order03  { background: #FF3300; height: 25; color: #FFFFFF; font-family: Verdana; font-weight: bold;}";
        strEmail += "tr.R_order01  { background-color: #FFFFFF; height: 25;}";
        strEmail += "tr.R_order02  { background-color: #E9E9E9; height: 25;}";
        strEmail += ".t01{ color:#FF3300; font-size: 10px; line-height: 14px; font-family: Verdana;}";
        strEmail += ".t02{ color:#FF3300; font-size: 11px; line-height: 16px; font-family: Verdana; font-weight: bold;}";
        strEmail += ".t03{ color:#FFFFFF; font-size: 11px; line-height: 16px; font-family: Verdana; font-weight: bold;}";
        strEmail += ".t04{ color:#000000; font-size: 9px; line-height: 16px; font-family: Verdana;}";
        strEmail += ".t05{ color:#CC0000; font-size: 11px; line-height: 16px; font-family: Verdana; font-weight: bold;}";
        strEmail += ".t06{ color:#000000; font-size: 14px; line-height: 16px; font-family: Verdana; font-weight: bold;}";
        strEmail += ".t07{ color:#FF3300; font-size: 10px; line-height: 14px; font-family: Verdana; font-weight: bold;}";
        strEmail += ".t08{ color:#000000; font-size: 9px; line-height: 16px; font-family: Verdana;}";
        strEmail += ".t09  { color:#000000; font-size: 16px; line-height: 20px; font-family: Verdana; font-weight: bold;}";
        strEmail += ".t10  { color:#005599; font-size: 16px; line-height: 20px; font-family: Verdana; font-weight: bold;}";
        strEmail += ".head06{ color:#FF3300; font-size: 16px; line-height: 20px; font-family: Verdana; font-weight: bold;}";
        strEmail += "a.d07 {   color: #0000EE; text-decoration: underline; font-family: Verdana;}";
        strEmail += "a.d07:hover {  color: #0000EE; text-decoration: none; font-family: Verdana;}</style>";

        if (Utility.Transaction.CurrentSearchConditions is Terms.Sales.Business.HotelSearchCondition)
        {
            strEmail += "Hotel Only";
        }
        if (Utility.Transaction.CurrentSearchConditions is Terms.Sales.Business.AirSearchCondition)
        {
            strEmail += "Flight Only";
        }
        if (Utility.Transaction.CurrentSearchConditions is Terms.Sales.Business.PackageSearchCondition)
        {
            strEmail += "Package (Flight + Hotel)";
        }

        if (string.IsNullOrEmpty(pSaleOrderService.RcordLocator))
        {
            strEmail += "Confirmation: N/A </span></font></b></p></td></tr></table>";
        }
        else
        {
            strEmail += "Confirmation: " + pSaleOrderService.RcordLocator + " </span></font></b></p></td></tr></table>";
        }

        mailMessage.Body = strEmail + TextBox1.Text + "<BR>" +this.Transaction.TermsConditions;

        #if DEBUG
            try
            {
                using (StreamWriter sw = File.CreateText("c:\\OrderEmail\\B2BTourEmail.html"))
                {
                    sw.Write(mailMessage.Body);
                }
            }
            catch
            {
                //防止未注释被XXX暴头
            }
        #endif
        if (Utility.IsSubAgent)
        {
            if (Utility.Transaction.CurrentSearchConditions is Terms.Sales.Business.HotelSearchCondition)
            {
                Terms.Member.Utility.MemberUtility.SendEmail(mailMessage, "B2BHotel");
            }
            if (Utility.Transaction.CurrentSearchConditions is Terms.Sales.Business.AirSearchCondition)
            {
                Terms.Member.Utility.MemberUtility.SendEmail(mailMessage, "B2BAir");
            }
            if (Utility.Transaction.CurrentSearchConditions is Terms.Sales.Business.PackageSearchCondition)
            {
                Terms.Member.Utility.MemberUtility.SendEmail(mailMessage, "B2BPackage");
            }
            if (Utility.Transaction.CurrentSearchConditions is Terms.Sales.Business.TourSearchCondition)
            {
                Terms.Member.Utility.MemberUtility.SendEmail(mailMessage, "B2BTour");
            }
        }
        else
        {
            if (Utility.Transaction.CurrentSearchConditions is Terms.Sales.Business.HotelSearchCondition)
            {
                Terms.Member.Utility.MemberUtility.SendEmail(mailMessage, "Hotel");
            }
            if (Utility.Transaction.CurrentSearchConditions is Terms.Sales.Business.AirSearchCondition)
            {
                Terms.Member.Utility.MemberUtility.SendEmail(mailMessage, "Air");
            }
            if (Utility.Transaction.CurrentSearchConditions is Terms.Sales.Business.PackageSearchCondition)
            {
                Terms.Member.Utility.MemberUtility.SendEmail(mailMessage, "Package");
            }
            if (Utility.Transaction.CurrentSearchConditions is Terms.Sales.Business.TourSearchCondition)
            {
                Terms.Member.Utility.MemberUtility.SendEmail(mailMessage, "Tour");
            }
        }

        //Terms.Member.Utility.MemberUtility.SendEmail(mailMessage, "B2C");
    }