Example #1
0
        void Initialize()
        {
            user    = Util.Data.GetUser();
            store   = Util.Data.GetStore();
            product = ProductObject;

            //Get Task
            if (Task == Enums.Task.Get || Task == Enums.Task.Update)
            {
                GetProduct();
            }
            else if (Task == Enums.Task.Create)
            {
                product = new Backend.Objects.Product
                {
                    Supplier = new Backend.Objects.ProductSupplier(),
                    Brand    = new Backend.Objects.ProductBrand(),
                    Type     = new Backend.Objects.ProductType(),
                    Tax      = new Backend.Objects.Tax()
                };

                txtCustomBarcode.Text = ServerUtil.RandomDigits(13);
                btnDelete.Visible     = false;
            }

            sign_currency1.Text = sign_currency2.Text = store.CurrencySign;

            // Add DropDown Items
            SetDropDownItems();

            Translate();
        }
Example #2
0
        void Initialize()
        {
            Store             = Util.Data.GetStore();
            lblStoreName.Text = Store.Name;

            Translate();
        }
Example #3
0
 void Initialize()
 {
     Store = Util.Data.GetStore();
     User  = Util.Data.GetUser();
     GetPaymentTypes();
     Translate();
 }
Example #4
0
        void Initialize()
        {
            actionUser = Util.Data.GetUser();
            store      = Util.Data.GetStore();
            user       = CurrentUser;

            //Get Task
            if (Task == Enums.Task.Get || Task == Enums.Task.Update)
            {
                IsUserRegistered = true;

                GetUser();

                text_EnterPassword.Text  = "Change Password";
                text_RepeatPassword.Text = "Repeat New Password";

                //Render User Token Code
                RenderUserCode();
            }
            else
            {
                IsUserRegistered = btnDelete.Visible = false;
            }

            if (!Util.Func.IsUserAllowed(actionUser))
            {
                dpdRole.Enabled = false;
            }

            ReArrangePanel();

            Translate();
        }
Example #5
0
        void Initialize()
        {
            Store = Util.Data.GetStore();

            GetInsights();

            Translate();
        }
Example #6
0
        void Initialize()
        {
            User  = Util.Data.GetUser();
            Store = Util.Data.GetStore();

            GetProduct();
            Translate();
        }
Example #7
0
        void Initialize()
        {
            store = Util.Data.GetStore();
            GetLoginInfo();
            Translate();

            ToPanel(AuthPanels.Login);
        }
Example #8
0
        void Initialize()
        {
            user  = Util.Data.GetUser();
            store = Util.Data.GetStore();

            GetUsers();

            Translate();
        }
Example #9
0
        public void Initialize()
        {
            User  = Util.Data.HandshakeUser(ParentForm);
            Store = Util.Data.HandshakeStore(ParentForm);

            GetStore();

            //Translate
            Translate();
        }
Example #10
0
        void Initialize()
        {
            User  = Util.Data.GetUser();
            Store = Util.Data.GetStore();

            // Do Work
            AsyncWorkerInitialize.RunWorkerAsync();

            Translate();
        }
Example #11
0
        void Initialize()
        {
            User  = Util.Data.GetUser();
            Store = Util.Data.GetStore();

            GetSales();

            SetDropDownItems();

            Translate();
        }
Example #12
0
        void Initialize()
        {
            // Get
            user  = Util.Data.GetUser();
            store = Util.Data.GetStore();

            // Get
            GetTypes();

            Translate();
        }
Example #13
0
        void Initialize()
        {
            // Get
            User  = Util.Data.GetUser();
            Store = Util.Data.GetStore();

            GetProducts();

            SetDropDownItems();

            Translate();
        }
Example #14
0
        void Initialize()
        {
            User  = Util.Data.GetUser();
            Store = Util.Data.GetStore();

            GetPayments();

            // Last week
            dpDateFrom.Value = DateTime.Today.AddDays(-7);
            dpDateTo.Value   = DateTime.Today;

            Translate();
        }
Example #15
0
        void Initialize(bool updateModels = false)
        {
            User        = Util.Data.GetUser();
            Store       = Util.Data.GetStore();
            taxModel    = new TaxModel();
            subTaxModel = new TaxModel();

            GetTaxes();

            AddModels();

            //Translate
            Translate();
        }
Example #16
0
        void Initialize()
        {
            User  = Util.Data.GetUser();
            Store = Util.Data.GetStore();

            if (Task == Enums.Task.ReadOnly)
            {
                btnDelete.Visible = btnEditProduct.Visible = btnPrintLabel.Visible = false;
            }

            //Get
            GetProduct();

            Translate();
        }
Example #17
0
        void Initialize()
        {
            User  = Util.Data.GetUser();
            Store = Util.Data.GetStore();

            if (!Util.Func.IsUserAllowed(User))
            {
                btnSelectProduct.Visible = false;
            }

            //
            RenderCards(false);

            Translate();
        }
Example #18
0
        void Initialize()
        {
            User  = Util.Data.GetUser();
            Store = Util.Data.GetStore();

            CheckUser();

            lblUserName.Text   = $"{ User.FirstName } { User.LastName }";
            lblUserEmail.Text  = User.Email;
            lblUserRole.Text   = User.Role;
            imgUserImage.Image = User.ProfileOvalImage;

            // Get & Synchronize Insights
            GetInsights();

            Translate();
        }
Example #19
0
        public void Initialize()
        {
            // Get a Store LogOut if an error occurs
            user  = Util.Data.HandshakeUser(this);
            store = Util.Data.HandshakeStore(this);

            serverSignal.Start();

            UserTabSlider.RootFormIndex = (int)UserTab.RootForm.MainDashBoard;
            lblStoreName.Text           = store.Name;
            lblUserDisplayName.Text     = $"{ user.FirstName } { user.LastName }";
            imgUserProfile.Image        = user.ProfileOvalImage;

            AddTabs();

            //Align Controls
            Util.Methods.AlignToParent(lblStoreName, pnlHeader);
        }
Example #20
0
        public void Initialize()
        {
            User  = Util.Data.GetUser();
            Store = Util.Data.GetStore();

            GetCustomers();

            // Get Groups
            var response = QueryController.Customers.Group.GetGroups();

            if (response.StatusCode == 200)
            {
                foreach (Backend.Objects.CustomerGroup group in response.DataArray)
                {
                    dpdCustomerGroup.AddItem(group.Name);
                }
            }

            Translate();
        }
Example #21
0
        public void Initialize()
        {
            // Get store & user LogOut if an error occurs
            user  = Util.Data.HandshakeUser(this);
            store = Util.Data.HandshakeStore(this);

            Translate();

            serverStatus.Start();

            timTime.Start();

            lblUserDisplayName.Text = $"{ user.FirstName } { user.LastName }";
            lblUserRole.Text        = user.Role;
            imgUserProfile.Image    = user.ProfileOvalImage;

            lblStoreName.Text = store.Name;
            lblDateDay.Text   = StringUtil.ToDateString(DateTime.Now);
            lblDateTime.Text  = DateTime.Now.ToString("HH:mm");

            //Align Controls
            Util.Methods.AlignToParent(lblStoreName, this);
        }
Example #22
0
        void Initialize()
        {
            User     = Util.Data.GetUser();
            Store    = Util.Data.GetStore();
            discount = DiscountObject;

            //Get Task
            if (Task == Enums.Task.Get || Task == Enums.Task.Update)
            {
                GetDiscount();
                GetDiscountProducts();
            }
            else if (Task == Enums.Task.Create)
            {
                discount = new Backend.Objects.Discount {
                    Type = null
                };
                txtDiscountValue.Text = "0";
                btnDelete.Visible     = false;
            }

            Translate();
        }