Example #1
0
 public BarMenuViewModel(IFairiesMemberManageUow uow)
     : base(uow, new List <string>())
 {
     this.SetTimer();
     this.SectionType = (int)DXInfo.Models.SectionType.Bar;
     dmf = new DXInfo.Restaurant.DeskManageFacade(uow, Dept.DeptId, User.UserId);
 }
Example #2
0
        public LoginViewModel(IFairiesMemberManageUow uow)
            : base(uow, new List <string>() { "UserName", "Password" })
        {
            winLoad();

            this.Title = ClientCommon.ClientSideTitle();
        }
Example #3
0
        public DeskCardConsume3Window(IFairiesMemberManageUow uow, dynamic d)
        {
            this.uow = uow;
            InitializeComponent();
            GridPrint.DataContext  = d;
            GridPrint2.DataContext = d;
            if (d.CardDonateInventory == null || d.CardDonateInventory.Count == 0)
            {
                CDI.Visibility  = System.Windows.Visibility.Collapsed;
                CDI2.Visibility = System.Windows.Visibility.Collapsed;
            }
            if (d.Voucher == 0)
            {
                txtV1.Visibility = System.Windows.Visibility.Collapsed;
                txtV2.Visibility = System.Windows.Visibility.Collapsed;
            }
            decimal dsum    = d.Sum;
            decimal damount = d.Amount;

            txtDiscountAmount.Text = (dsum - damount).ToString("f2");
            string printTitle = Common.PrintTicketTitle(uow, DXInfo.Models.NameCodeType.PrintTicketTitle1OfWR);

            if (!string.IsNullOrEmpty(printTitle))
            {
                this.txtTitle.Text = printTitle;
            }
        }
 public AddCardUserControl(IFairiesMemberManageUow uow)
 {
     this.uow = uow;
     InitializeComponent();
     _lcl = uow.CardLevels.GetAll().ToList();
     _lct = uow.CardTypes.GetAll().ToList();
 }
Example #5
0
 public InvPriceSetWindow(IFairiesMemberManageUow uow, InventoryEx d)
 {
     this.uow = uow;
     InitializeComponent();
     this.DataContext = new CardConsumeSetViewModel(uow, d);
     iex = d;
 }
 public ModifyMemberViewModel(IFairiesMemberManageUow uow, Guid memberId, Guid cardId)
     : base(uow, new List <string>() { "SelectedCardLevel", "SelectedCardType", "CardNo", "MemberName" })
 {
     this.Member     = uow.Members.GetById(g => g.Id == memberId);
     this.Card       = uow.Cards.GetById(g => g.Id == cardId);
     this.CardNo     = this.Card.CardNo;
     this.MemberName = this.Member.MemberName;
 }
Example #7
0
 public ReceiptModifyViewModel(IFairiesMemberManageUow uow, Guid memberId, Guid receiptId)
     : base(uow, new List <string>() { "MemberName", "Content", "LinkPhone" })
 {
     this.Member     = uow.Members.GetById(g => g.Id == memberId);
     this.Receipt    = uow.Receipts.GetById(g => g.Id == receiptId);
     this.MemberName = this.Member.MemberName;
     this.Content    = this.Receipt.Content;
     this.LinkPhone  = this.Member.LinkPhone;
 }
Example #8
0
 public NoMemberConsumeUserControl(IFairiesMemberManageUow uow)
 {
     this.uow = uow;
     InitializeComponent();
     lvCategory.ItemsSource = uow.InventoryCategory.GetAll().OrderBy(o => o.Code).ToList();
     BindInv();
     lvInv.View      = lvInv.FindResource("tileView") as ViewBase;
     lvCategory.View = lvInv.FindResource("tileViewCategory") as ViewBase;
 }
Example #9
0
 public Common(IFairiesMemberManageUow uow, Guid operId, Guid deptId, Guid?orgId, string deptCode, string operCode)//, int vouchAuthority)
 {
     this.uow            = uow;
     this.operId         = operId;
     this.deptId         = deptId;
     this.orgId          = orgId;
     this.vouchAuthority = GetVouchAuthority();//vouchAuthority;
     this.deptCode       = deptCode;
     this.operCode       = operCode;
 }
        public CardConsumeWindow(IFairiesMemberManageUow uow)
        {
            this.uow = uow;
            InitializeComponent();
            string printTitle = Common.PrintTicketTitle(uow, DXInfo.Models.NameCodeType.PrintTicketTitle1OfCold);

            if (!string.IsNullOrEmpty(printTitle))
            {
                this.txtTitle.Text = printTitle;
            }
        }
Example #11
0
 public Service1(IFairiesMemberManageUow uow)
 {
     this.uow         = uow;
     this.localDeptId = Guid.Empty;
     DXInfo.Models.NameCode nc = uow.NameCode.GetAll().Where(w => w.Type == "LocalDept").FirstOrDefault();
     if (nc != null)
     {
         Guid.TryParse(nc.Value, out localDeptId);
     }
     Mapper.CreateMap <DXInfo.Models.OrderMenus, DXInfo.Models.OrderMenusHis>();
 }
        public PointsExchangeWindow(IFairiesMemberManageUow uow)
        {
            this.uow = uow;
            InitializeComponent();
            this.ClientCommon = new Common(uow);
            string printTitle = ClientCommon.PrintTicketTitle(DXInfo.Models.NameCodeType.PrintTicketTitleOfMember);

            if (!string.IsNullOrEmpty(printTitle))
            {
                this.txtTitle.Text = printTitle;
            }
        }
        public PointsExchangeWindow(IFairiesMemberManageUow uow, dynamic d)
        {
            this.uow = uow;
            InitializeComponent();
            GridPrint.DataContext = d;
            string printTitle = ClientCommon.PrintTicketTitle(DXInfo.Models.NameCodeType.PrintTicketTitleOfMember);

            if (!string.IsNullOrEmpty(printTitle))
            {
                this.txtTitle.Text = printTitle;
            }
        }
Example #14
0
 public StockManageFacade(IFairiesMemberManageUow uow, Guid operId, Guid deptId, Guid?orgId, string deptCode, string operCode)//, int vouchAuthority)
 {
     this.uow      = uow;
     this.operId   = operId;
     this.deptId   = deptId;
     this.orgId    = orgId;
     this.deptCode = deptCode;
     this.operCode = operCode;
     //this.vouchAuthority = vouchAuthority;
     this.common         = new Common(uow, operId, deptId, orgId, deptCode, operCode);//,vouchAuthority);
     this.vouchAuthority = this.common.vouchAuthority;
     this.isShelfLife    = this.common.IsShelfLife();
     this.isLocator      = this.common.IsLocator();
 }
Example #15
0
        public DeskMenuWindow(IFairiesMemberManageUow uow)
        {
            this.uow = uow;
            InitializeComponent();
            var q = from d in uow.InventoryCategory.GetAll()
                    join d1 in uow.CategoryDepts.GetAll() on d.Id equals d1.Category into dd1
                    from dd1s in dd1.DefaultIfEmpty()
                    where dd1s.Dept == App.MyIdentity.dept.DeptId
                    select d;

            lvCategory.ItemsSource = q.ToList();
            BindInv();
            lvInv.View      = lvInv.FindResource("tileView") as ViewBase;
            lvCategory.View = lvInv.FindResource("tileViewCategory") as ViewBase;
        }
Example #16
0
        public CardConsumeViewModel(IFairiesMemberManageUow uow)
            : base(uow)
        {
            this.IsCupType = BusinessCommon.IsCupType();
            bool imageColumnVisibility = BusinessCommon.ImageColumnVisibility();

            if (imageColumnVisibility)
            {
                this.ImageColumnVisibility = Visibility.Visible;
            }
            else
            {
                this.ImageColumnVisibility = Visibility.Collapsed;
            }
        }
Example #17
0
        public DeskBookWindow(IFairiesMemberManageUow uow, bool isModify, DXInfo.Models.OrderBooks orderBook)
        {
            this.uow = uow;
            InitializeComponent();
            this.isModify     = isModify;
            this.orderBook    = orderBook;
            txtLinkName.Text  = orderBook.Customer;
            txtLinkPhone.Text = orderBook.LinkPhone;
            txtQuantity.Text  = Convert.ToString(orderBook.Quantity);

            dpBeginDate.Text = orderBook.BookBeginDate.ToString("yyyy/MM/dd");
            dpEndDate.Text   = orderBook.BookEndDate.ToString("yyyy/MM/dd");

            tpBeginTime.Value = Convert.ToDateTime(orderBook.BookBeginDate.ToString("yyyy/MM/dd HH:mm"));
            tpEndTime.Value   = Convert.ToDateTime(orderBook.BookEndDate.ToString("yyyy/MM/dd HH:mm"));
        }
Example #18
0
        public BaseController(IFairiesMemberManageUow uow)
        {
            this.Uow                              = uow;
            this.businessCommon                   = new DXInfo.Business.Common(uow);
            this.isOperatorsOnDuty                = businessCommon.OperatorsOnDuty();
            this.isBatch                          = businessCommon.IsBatch();
            this.isLocator                        = businessCommon.IsLocator();
            this.isShelfLife                      = businessCommon.IsShelfLife();
            this.saleColumnVisibility             = businessCommon.SaleColumnVisibility();
            this.ipadColumnVisibility             = businessCommon.IpadColumnVisibility();
            this.jewelryColumnVisibility          = businessCommon.JewelryColumnVisibility();
            this.isNecessaryBatch                 = businessCommon.IsNecessaryBatch();
            this.isSaleDiscount                   = businessCommon.IsSaleDiscount();
            this.unitOfMeasureColumnVisibility    = businessCommon.UnitOfMeasureColumnVisibility();
            this.cupTypeColumnVisible             = businessCommon.CupTypeColumnVisible();
            this.otherOutStockPriceColumnVisible  = businessCommon.OtherOutStockPriceColumnVisible();
            this.otherOutStockAmountColumnVisible = businessCommon.OtherOutStockAmountColumnVisible();
            this.salePrice0ColumnVisible          = businessCommon.SalePrice0ColumnVisible();
            this.salePrice1ColumnVisible          = businessCommon.SalePrice1ColumnVisible();
            this.salePrice2ColumnVisible          = businessCommon.SalePrice2ColumnVisible();
            this.transVouchPriceColumnVisible     = businessCommon.TransVouchPriceColumnVisible();
            this.transVouchAmountColumnVisible    = businessCommon.TransVouchAmountColumnVisible();
            this.isDisplayImage                   = businessCommon.IsDisplayImage();

            MembershipUser muser = Membership.GetUser();

            if (muser != null)
            {
                string struserid = muser.ProviderUserKey.ToString();
                if (!string.IsNullOrEmpty(struserid))
                {
                    this.operId = Guid.Parse(struserid);

                    DXInfo.Models.aspnet_CustomProfile user = uow.aspnet_CustomProfile.GetAll().Where(w => w.UserId == this.operId).FirstOrDefault();
                    if (user == null || !user.DeptId.HasValue)
                    {
                        deptId = Guid.Empty;
                    }
                    else
                    {
                        deptId = user.DeptId.Value;
                    }
                }
            }
            this.centerCommon         = new Common(uow);
            this.isProductTypeVisible = centerCommon.IsProductTypeVisible();
        }
Example #19
0
        public NoMemberConsumeWindow(IFairiesMemberManageUow uow, dynamic d, bool isPrint)
        {
            this.uow = uow;
            InitializeComponent();
            GridPrint.DataContext = d;
            IsPrint = isPrint;
            if (isPrint)
            {
                txtCash.IsEnabled = false;
            }
            string printTitle = Common.PrintTicketTitle(uow, DXInfo.Models.NameCodeType.PrintTicketTitle1OfCold);

            if (!string.IsNullOrEmpty(printTitle))
            {
                this.txtTitle.Text = printTitle;
            }
        }
 public DataBaseBackupWindow(IFairiesMemberManageUow uow, bool isBackup)
 {
     this.uow = uow;
     InitializeComponent();
     this.IsBackup = isBackup;
     if (isBackup)
     {
         btnFileName.Visibility = System.Windows.Visibility.Collapsed;
         btnRestore.Visibility  = System.Windows.Visibility.Collapsed;
     }
     else
     {
         btnDirectory.Visibility = System.Windows.Visibility.Collapsed;
         btnBackup.Visibility    = System.Windows.Visibility.Collapsed;
         this.Title           = "恢复数据库";
         this.lblPath.Content = "恢复文件";
     }
 }
Example #21
0
        public DownLoadViewModel(IFairiesMemberManageUow uow, string resourceType)
            : base(uow, new List <string>())
        {
            this.OCDownloadFileInfo = new ObservableCollection <DXInfo.Models.DownloadFileInfo>();
            string connectorUrlString = ClientCommon.GetConnectorUrlString();

            switch (resourceType)
            {
            case "mp3":
                DownloadBusiness = MyDownloadBusiness.DownloadMp3BusinessInstance(connectorUrlString);
                break;

            case "images":
                DownloadBusiness = MyDownloadBusiness.DownloadImageBusinessInstance(connectorUrlString);
                break;
            }
            DownloadBusiness.DownloadMsgEvent += new MyDownloadBusiness.DownloadMsgEventHandler(DownloadBusiness_DownloadMsgEvent);
        }
Example #22
0
        public ReportViewModelBase(IFairiesMemberManageUow uow)
            : base(uow, new List <string>())
        {
            this.SetlOper();
            this.SetlPayType();
            Messenger.Default.Register <DataGridMessageToken>(this, Handle_DataGridMessageToken);

            bool bCupTypeColVis = BusinessCommon.CupTypeColumnVisible();

            this.CupTypeColumnVisibility = bCupTypeColVis ? System.Windows.Visibility.Visible : System.Windows.Visibility.Collapsed;

            bool bUnitOfMeasureColVis = BusinessCommon.UnitOfMeasureColumnVisibility();

            this.UnitOfMeasureColumnVisibility = bUnitOfMeasureColVis ? System.Windows.Visibility.Visible : System.Windows.Visibility.Collapsed;

            bool bOperatorsOnDuty = BusinessCommon.OperatorsOnDuty();

            this.OperatorsOnDutyColumnVisibility = bOperatorsOnDuty ? System.Windows.Visibility.Visible : System.Windows.Visibility.Collapsed;
        }
Example #23
0
 public DeskCardCashWindow(IFairiesMemberManageUow uow, Guid id)
 {
     this.uow = uow;
     InitializeComponent();
     card = uow.Cards.GetById(id);//.Where(w => w.Id == id).FirstOrDefault();
     if (card == null)
     {
         lblPwd.Visibility = System.Windows.Visibility.Collapsed;
         txtPwd.Visibility = System.Windows.Visibility.Collapsed;
     }
     else
     {
         if (string.IsNullOrEmpty(card.CardPwd))
         {
             lblPwd.Visibility = System.Windows.Visibility.Collapsed;
             txtPwd.Visibility = System.Windows.Visibility.Collapsed;
         }
     }
 }
Example #24
0
 public AddMemberViewModel(IFairiesMemberManageUow uow)
     : base(uow, new List <string>() { "SelectedCardLevel", "SelectedCardType", "CardNo", "MemberName" })
 {
     this.SetCardLevelAuto();
     if (this.IsCardLevelAuto)
     {
         List <string> lValidationPropertyNames = new List <string>()
         {
             "SelectedCardType", "CardNo", "MemberName"
         };
         this.SetValidate(lValidationPropertyNames);
     }
     else
     {
         this.SetlCardLevel();
     }
     this.InitObject();
     this.SetlCardType();
 }
 public NoMemberCashViewModel(IFairiesMemberManageUow uow,
                              List <string> lValidationPropertyNames,
                              decimal dReceivableAmount,
                              string title,
                              bool bReceivable, bool bPassword, bool bDeskNo)
     : base(uow, lValidationPropertyNames)//new List<string>() { "DeskNo","Cash"})
 {
     this.Title            = title;
     this.ReceivableAmount = dReceivableAmount;
     this.Cash             = dReceivableAmount;
     if (bReceivable)
     {
         this.ReceivableVisibility = System.Windows.Visibility.Visible;
     }
     else
     {
         this.ReceivableVisibility = System.Windows.Visibility.Collapsed;
     }
     if (bPassword)
     {
         this.PasswordVisibility = System.Windows.Visibility.Visible;
     }
     else
     {
         this.PasswordVisibility = System.Windows.Visibility.Collapsed;
     }
     if (bDeskNo)
     {
         this.DeskNoVisibility = System.Windows.Visibility.Visible;
     }
     else
     {
         this.DeskNoVisibility = System.Windows.Visibility.Collapsed;
     }
     this.bReceivable = bReceivable;
     this.bPassword   = bPassword;
     this.bDeskNo     = bDeskNo;
 }
        public CardConsume2Window(IFairiesMemberManageUow uow, dynamic d)
        {
            this.uow = uow;
            InitializeComponent();
            GridPrint.DataContext  = d;
            GridPrint2.DataContext = d;
            if (d.CardDonateInventory == null || d.CardDonateInventory.Count == 0)
            {
                CDI.Visibility  = System.Windows.Visibility.Collapsed;
                CDI2.Visibility = System.Windows.Visibility.Collapsed;
            }
            if (d.Voucher == 0)
            {
                txtV1.Visibility = System.Windows.Visibility.Collapsed;
                txtV2.Visibility = System.Windows.Visibility.Collapsed;
            }
            string printTitle = Common.PrintTicketTitle(uow, DXInfo.Models.NameCodeType.PrintTicketTitle1OfCold);

            if (!string.IsNullOrEmpty(printTitle))
            {
                this.txtTitle.Text = printTitle;
            }
        }
Example #27
0
 public BaseController(IFairiesMemberManageUow uow)
 {
     this.Uow          = uow;
     this.centerCommon = new Common(uow);
     this.operId       = this.centerCommon.operId;
     this.deptId       = this.centerCommon.deptId;
     this.orgId        = this.centerCommon.orgId;
     this.deptCode     = this.centerCommon.deptCode;
     this.operCode     = this.centerCommon.operCode;
     //this.vouchAuthority = this.centerCommon.vouchAuthority;
     this.businessCommon                   = new DXInfo.Business.Common(uow, operId, deptId, orgId, deptCode, operCode);//, vouchAuthority);
     this.vouchAuthority                   = this.businessCommon.vouchAuthority;
     this.isOperatorsOnDuty                = businessCommon.OperatorsOnDuty();
     this.isBatch                          = businessCommon.IsBatch();
     this.isLocator                        = businessCommon.IsLocator();
     this.isShelfLife                      = businessCommon.IsShelfLife();
     this.saleColumnVisibility             = businessCommon.SaleColumnVisibility();
     this.ipadColumnVisibility             = businessCommon.IpadColumnVisibility();
     this.jewelryColumnVisibility          = businessCommon.JewelryColumnVisibility();
     this.isNecessaryBatch                 = businessCommon.IsNecessaryBatch();
     this.isSaleDiscount                   = businessCommon.IsSaleDiscount();
     this.unitOfMeasureColumnVisibility    = businessCommon.UnitOfMeasureColumnVisibility();
     this.cupTypeColumnVisible             = businessCommon.CupTypeColumnVisible();
     this.otherOutStockPriceColumnVisible  = businessCommon.OtherOutStockPriceColumnVisible();
     this.otherOutStockAmountColumnVisible = businessCommon.OtherOutStockAmountColumnVisible();
     this.salePrice0ColumnVisible          = businessCommon.SalePrice0ColumnVisible();
     this.salePrice1ColumnVisible          = businessCommon.SalePrice1ColumnVisible();
     this.salePrice2ColumnVisible          = businessCommon.SalePrice2ColumnVisible();
     this.transVouchPriceColumnVisible     = businessCommon.TransVouchPriceColumnVisible();
     this.transVouchAmountColumnVisible    = businessCommon.TransVouchAmountColumnVisible();
     this.scrapVouchPriceColumnVisible     = businessCommon.ScrapVouchPriceColumnVisible();
     this.scrapVouchAmountColumnVisible    = businessCommon.ScrapVouchAmountColumnVisible();
     this.isDisplayImage                   = businessCommon.IsDisplayImage();
     this.isSyncSaleStock                  = businessCommon.IsSyncSaleStock();
     this.isProductTypeVisible             = Helper.IsProductTypeVisible();
     this.isCardLevelAuto                  = businessCommon.IsCardLevelAuto();
 }
 public ModifyMemberUserControl(IFairiesMemberManageUow uow, Guid id, Guid cardId)
 {
     InitializeComponent();
     this.DataContext = new ModifyMemberViewModel(uow, id, cardId);
 }
Example #29
0
 public DataBaseBackupUserControl(IFairiesMemberManageUow uow)
 {
     this.uow = uow;
     InitializeComponent();
 }
Example #30
0
 public BillRepeatViewModel(IFairiesMemberManageUow uow)
     : base(uow)
 {
     this.IsCupType         = BusinessCommon.IsCupType();
     this.IsInvDynamicPrice = BusinessCommon.IsInvDynamicPrice();
 }