Ejemplo n.º 1
0
        public Main()
        {
            string language = ConfigurationManager.AppSettings["Language"];

            if (language.ToUpper() == "ENGLISH")
            {
                System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("en-US");
            }
            else if (language.ToUpper() == "GERMAN")
            {
                System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("de-DE");
            }

            InitializeComponent();
            ViewModel = new MainViewModel();

            SetLanguageDictionary();
            this.DataContext = ViewModel;
            ObservableCollection <ItemModel> ListGrid = new ObservableCollection <ItemModel>();

            CashRegisterName = textBlock14;

            var ScrCodeList = App.Current.Properties["AutoScrCodeList"] as List <SearchCodeAutoListModel>;

            foreach (var item in ScrCodeList)
            {
                textBox9.AddItem(new SearchCodeAutoListModel
                {
                    DisplayId   = item.DisplayId,
                    DisplayName = item.DisplayName
                });
            }

            ScrRef = textBox9;

            var ItemNameList = App.Current.Properties["AutoItemNameList"] as List <ItemNameAutoListModel>;

            foreach (var item in ItemNameList)
            {
                textBox2.AddItem(new ItemNameAutoListModel
                {
                    DisplayId   = item.DisplayId,
                    DisplayName = item.DisplayName
                });
            }



            NameRef1 = textBox2;

            var CustNameList = App.Current.Properties["AutoCustList"] as List <CustomerAutoCompleteListModel>;

            foreach (var item in CustNameList)
            {
                textBox6.AddItem(new CustomerAutoCompleteListModel
                {
                    DisplayId   = item.DisplayId,
                    DisplayName = item.DisplayName
                });
            }

            CustomerMainReff = textBox6;


            var BussinessNameList = App.Current.Properties["BussLocList"] as List <AutoBussinessModel>;

            foreach (var item in BussinessNameList)
            {
                textBox8.AddItem(new AutoBussinessModel
                {
                    DisplayId   = item.DisplayId,
                    DisplayName = item.DisplayName
                });
            }

            BussLocationMainReff = textBox8;


            textBox4.Text = "";
            ListQnt       = textBox4;
            // Select_BarCodee.Text = "";
            Grossamount.Text = "";
            GrossamountReff  = Grossamount;

            dataGrid1.ItemsSource = ListGrid;
            ListGridRef           = dataGrid1;

            textBox7.Text    = "";
            CustomerMainReff = textBox6;

            textBox.Text = "";
            VatMainReff  = textBox;


            netamount.Text    = "";
            NetAmountMainReff = netamount;

            //textBox2.Text = "";
            //ItemMainReff = textBox2;

            //textBox9.Text = "";
            //ItemSearchMainReff = textBox9;ItemTotalMainReff

            textBox5.Text     = "";
            ItemTotalMainReff = textBox5;

            //textBox6.Text = "";
            BussLocationMainReff = textBox8;


            textBox3.Text    = "";
            DiscountMainReff = textBox3;
            //textBox3_Copy1.Text = "";
            //SaleUnitRef = textBox3_Copy1;

            textBlock3.Text = "";
            BusinessLocName = textBlock3;

            textBlock21.Text = "";
            BusinessAddress  = textBlock21;

            timer.Interval = Interval;
            timer.Tick    += timer_Tick;
            timer.Start();
        }
Ejemplo n.º 2
0
        public AddCustomer()
        {
            InitializeComponent();
            _CVM             = new CustomerViewModel();
            this.DataContext = _CVM;

            LOYALTY_NO.Text = "";
            LoyaltyRef      = LOYALTY_NO;

            textBlock7.Text = "";
            showloyality    = textBlock7;


            SHIPPING_EMAIL_ADDRESS.Text = "";
            ShippingemailAddressReff    = SHIPPING_EMAIL_ADDRESS;

            ImgSource.Source = null;
            ImageReff        = ImgSource;


            var CustNameList = App.Current.Properties["AutoCustList"] as List <CustomerAutoCompleteListModel>;

            foreach (var item in CustNameList)
            {
                REFERRED_BY.AddItem(new CustomerAutoCompleteListModel
                {
                    DisplayId   = item.DisplayId,
                    DisplayName = item.DisplayName
                });
            }


            REFERRED_BY.Text = "";
            ReferredRef      = REFERRED_BY;

            var CustGroupList = App.Current.Properties["AutoCustGroup"] as List <CustomerGroupAutoModel>;

            foreach (var item in CustGroupList)
            {
                textBox6.AddItem(new CustomerGroupAutoModel
                {
                    DisplayId   = item.DisplayId,
                    DisplayName = item.DisplayName
                });
            }

            textBox6.Text = "";
            CustGroupRef  = textBox6;

            //textboxBusLoc.Text = "";
            //BusinessLoc = textboxBusLoc;

            textBlock17_Copy.Text = "";
            OpBalReff             = textBlock17_Copy;


            textBlock17_Copy1.Text = "";
            BalanceTyprReff        = textBlock17_Copy1;

            if (App.Current.Properties["Action"] != null)
            {
                ImgSource.Source = App.Current.Properties["ItemViewImg"] as ImageSource;
                App.Current.Properties["ItemViewImg"] = null;
            }
            if (App.Current.Properties["getTotalPending"] != null)
            {
                textBlock7.Text = App.Current.Properties["getTotalPending"].ToString();
            }
            //if (App.Current.Properties["Action1"] == "1")
            //{
            //    ImgSource.Source = null;
            //    App.Current.Properties["Action1"] = null;

            //}
        }