Exemplo n.º 1
0
        public async void Add_Catagory()
        {
            if (SelectedCatagory.CATAGORY_NAME == "" || SelectedCatagory.CATAGORY_NAME == null)
            {
                MessageBox.Show("Catagory Name is missing");
            }

            else
            {
                HttpClient client = new HttpClient();
                client.BaseAddress          = new Uri(GlobalData.gblApiAdress);
                SelectedCatagory.COMPANY_ID = Convert.ToInt32(App.Current.Properties["Company_Id"].ToString());
                client.DefaultRequestHeaders.Accept.Add(
                    new MediaTypeWithQualityHeaderValue("application/json"));
                client.Timeout = new TimeSpan(500000000000);
                var response = await client.PostAsJsonAsync("api/CatagoryAPI/CatagoryAdd/", SelectedCatagory);

                if (response.StatusCode.ToString() == "OK")
                {
                    MessageBox.Show("Catagory insert Successfully");
                    Cancel_Catagory();
                    ModalService.NavigateTo(new CategoryList(), delegate(bool returnValue) { });
                    //GetCatagory(SelectedCatagory.COMPANY_ID);
                    //Window_CatagoryList.CatGridRef.ItemsSource = null;
                    // Main.ListGridRef.ClearValue();
                    //Window_CatagoryList.CatGridRef.ItemsSource = _ListGrid_Catagory.ToList();
                }
            }
        }
Exemplo n.º 2
0
 public async void Delete_Designation()
 {
     if (selectDesignation.DESIGNATION_ID != null && selectDesignation.DESIGNATION_ID != 0)
     {
         MessageBoxResult messageBoxResult = System.Windows.MessageBox.Show("Are you sure Delete this Designation " + selectDesignation.DESIGNATION_NAME + "?", "Delete Confirmation", System.Windows.MessageBoxButton.YesNo);
         if (messageBoxResult == MessageBoxResult.Yes)
         {
             var        id     = selectDesignation.DESIGNATION_ID;
             HttpClient client = new HttpClient();
             client.DefaultRequestHeaders.Accept.Add(
                 new MediaTypeWithQualityHeaderValue("application/json"));
             client.BaseAddress = new Uri(GlobalData.gblApiAdress);
             HttpResponseMessage response = client.GetAsync("api/DesignationListAPI/DeleteDesignation?id=" + id + "").Result;
             if (response.StatusCode.ToString() == "OK")
             {
                 MessageBox.Show("Designation Delete Successfully");
                 ModalService.NavigateTo(new DesignationList(), delegate(bool returnValue) { });
             }
         }
         else
         {
             Cancel_Designation();
         }
     }
     else
     {
         MessageBox.Show("Select Designation");
     }
 }
Exemplo n.º 3
0
 public async void Delete_Catagory()
 {
     if (SelectedCatagory.CATAGORY_ID != null && SelectedCatagory.CATAGORY_ID != 0)
     {
         MessageBoxResult messageBoxResult = System.Windows.MessageBox.Show("Are you sure Delete this Catagory " + SelectedCatagory.CATAGORY_NAME + "?", "Delete Confirmation", System.Windows.MessageBoxButton.YesNo);
         if (messageBoxResult == MessageBoxResult.Yes)
         {
             var        id     = SelectedCatagory.CATAGORY_ID;
             HttpClient client = new HttpClient();
             client.DefaultRequestHeaders.Accept.Add(
                 new MediaTypeWithQualityHeaderValue("application/json"));
             client.BaseAddress = new Uri(GlobalData.gblApiAdress);
             HttpResponseMessage response = client.GetAsync("api/CatagoryAPI/DeleteCatagory?id=" + SelectedCatagory.CATAGORY_ID + "").Result;
             if (response.StatusCode.ToString() == "OK")
             {
                 MessageBox.Show("Catagory Delete Successfully");
                 ModalService.NavigateTo(new CategoryList(), delegate(bool returnValue) { });
             }
         }
         else
         {
             Cancel_Catagory();
         }
     }
     else
     {
         MessageBox.Show("Select Catagory");
     }
 }
Exemplo n.º 4
0
 public async void Delete_Product()
 {
     if (selectCustomer.CUSTOMER_ID != null && selectCustomer.CUSTOMER_ID != 0)
     {
         MessageBoxResult messageBoxResult = System.Windows.MessageBox.Show("Are you sure Delete this Product " + selectCustomer.CUSTOMER_ID + "?", "Delete Confirmation", System.Windows.MessageBoxButton.YesNo);
         if (messageBoxResult == MessageBoxResult.Yes)
         {
             var        id     = selectCustomer.CUSTOMER_ID;
             HttpClient client = new HttpClient();
             client.DefaultRequestHeaders.Accept.Add(
                 new MediaTypeWithQualityHeaderValue("application/json"));
             client.BaseAddress = new Uri(GlobalData.gblApiAdress);
             HttpResponseMessage response = client.GetAsync("api/ProductAPI/DeleteProduct?id=" + selectCustomer.CUSTOMER_ID + "").Result;
             if (response.StatusCode.ToString() == "OK")
             {
                 MessageBox.Show("Customer Deleted Successfully");
                 //GetDeliveryAddress(comp);
                 ModalService.NavigateTo(new CustomerList(), delegate(bool returnValue) { });
             }
         }
         else
         {
             Cancel_Customer();
         }
     }
     else
     {
         MessageBox.Show("Select Customer..");
     }
 }
Exemplo n.º 5
0
 public async void Delete_Estimate()
 {
     if (SelectedEstimate.EstimateID != null && SelectedEstimate.EstimateID != 0)
     {
         MessageBoxResult messageBoxResult = System.Windows.MessageBox.Show("Are you sure delete this estimate " + SelectedEstimate.EstimateNo + "?", "Delete Confirmation", System.Windows.MessageBoxButton.YesNo);
         if (messageBoxResult == MessageBoxResult.Yes)
         {
             var        id     = SelectedEstimate.EstimateID;
             HttpClient client = new HttpClient();
             client.DefaultRequestHeaders.Accept.Add(
                 new MediaTypeWithQualityHeaderValue("application/json"));
             client.BaseAddress = new Uri(GlobalData.gblApiAdress);
             HttpResponseMessage response = client.GetAsync("api/EstimateAPI/DeleteEstimate?id=" + id + "").Result;
             if (response.StatusCode.ToString() == "OK")
             {
                 ModalService.NavigateTo(new Estimate(), delegate(bool returnValue) { });
                 MessageBox.Show("Estimate Deleted Successfully");
             }
         }
         else
         {
             Cancel_Estimate();
         }
     }
     else
     {
         MessageBox.Show("Select Customer");
     }
 }
Exemplo n.º 6
0
        public async void Update_Godown()
        {
            if (SelectedGosown.GODOWN_NAME == "" || SelectedGosown.GODOWN_NAME == null)
            {
                MessageBox.Show("GODOWN NAME is missing");
                return;
            }
            else if (SelectedGosown.GOSOWN_DESCRIPTION == "" || SelectedGosown.GOSOWN_DESCRIPTION == null)
            {
                MessageBox.Show("GODOWN DESCRIPTION is missing");
                return;
            }
            else
            {
                HttpClient client = new HttpClient();
                client.BaseAddress        = new Uri(GlobalData.gblApiAdress);
                SelectedGosown.COMPANY_ID = Convert.ToInt32(App.Current.Properties["Company_Id"].ToString());
                client.DefaultRequestHeaders.Accept.Add(
                    new MediaTypeWithQualityHeaderValue("application/json"));
                client.Timeout = new TimeSpan(500000000000);
                var response = await client.PostAsJsonAsync("api/GodownAPI/GodownAdd/", SelectedGosown);

                if (response.StatusCode.ToString() == "OK")
                {
                    MessageBox.Show("Godown Updated Successfully");
                    Cancel_Godown();
                    ModalService.NavigateTo(new GodownList(), delegate(bool returnValue) { });
                }
            }
        }
Exemplo n.º 7
0
        public void TransferCashList()
        {
            clear();
            var color = (SolidColorBrush)(new BrushConverter().ConvertFrom("#FFFF0000"));

            WelComePage.transfercashReff.Background = color;
            ModalService.NavigateTo(new TransferCashList(), delegate(bool returnValue) { });
        }
Exemplo n.º 8
0
        public void InvoiceList_Click()
        {
            clear();
            var color = (SolidColorBrush)(new BrushConverter().ConvertFrom("#FFFF0000"));

            WelComePage.InvoiceReff.Background = color;
            ModalService.NavigateTo(new Invoice(), delegate(bool returnValue) { });
        }
Exemplo n.º 9
0
        public void Location_Click()
        {
            clear();
            var color = (SolidColorBrush)(new BrushConverter().ConvertFrom("#FFFF0000"));

            WelComePage.BussLocationReff.Background = color;
            ModalService.NavigateTo(new BussinessLocationList(), delegate(bool returnValue) { });
        }
Exemplo n.º 10
0
        public void Daily_Sales()
        {
            clear();
            var color = (SolidColorBrush)(new BrushConverter().ConvertFrom("#FFFF0000"));

            WelComePage.dailySalesReff.Background = color;
            ModalService.NavigateTo(new DailySales(), delegate(bool returnValue) { });
        }
Exemplo n.º 11
0
        public void ACCESS_RIDE()
        {
            clear();
            var color = (SolidColorBrush)(new BrushConverter().ConvertFrom("#FFFF0000"));

            WelComePage.AccessReff.Background = color;
            ModalService.NavigateTo(new AccessRide(), delegate(bool returnValue) { });
        }
Exemplo n.º 12
0
        public void Bank_DetailsList()
        {
            clear();
            var color = (SolidColorBrush)(new BrushConverter().ConvertFrom("#FFFF0000"));

            WelComePage.bankReff.Background = color;
            ModalService.NavigateTo(new BankList(), delegate(bool returnValue) { });
        }
Exemplo n.º 13
0
        public void Department_Click()
        {
            clear();
            var color = (SolidColorBrush)(new BrushConverter().ConvertFrom("#FFFF0000"));

            WelComePage.DepermentReff.Background = color;
            ModalService.NavigateTo(new Department_list(), delegate(bool returnValue) { });
        }
Exemplo n.º 14
0
        public void Employee_List()
        {
            clear();
            var color = (SolidColorBrush)(new BrushConverter().ConvertFrom("#FFFF0000"));

            WelComePage.Employee1Reff.Background = color;
            ModalService.NavigateTo(new Employee(), delegate(bool returnValue) { });
        }
Exemplo n.º 15
0
        public void RecvItemList()
        {
            clear();
            var color = (SolidColorBrush)(new BrushConverter().ConvertFrom("#FFFF0000"));

            WelComePage.RecItemReff.Background = color;
            ModalService.NavigateTo(new ReceiveItems(), delegate(bool returnValue) { });
        }
Exemplo n.º 16
0
        public void AddSuppPyment()
        {
            clear();
            var color = (SolidColorBrush)(new BrushConverter().ConvertFrom("#FFFF0000"));

            WelComePage.SubpayReff.Background = color;
            ModalService.NavigateTo(new SuppPayList(), delegate(bool returnValue) { });
        }
Exemplo n.º 17
0
        public void StockLedger_List()
        {
            clear();
            var color = (SolidColorBrush)(new BrushConverter().ConvertFrom("#FFFF0000"));

            WelComePage.stockLegerReff.Background = color;
            ModalService.NavigateTo(new StockLedgerList(), delegate(bool returnValue) { });
        }
Exemplo n.º 18
0
        public void RecvPayment_Click()
        {
            clear();
            var color = (SolidColorBrush)(new BrushConverter().ConvertFrom("#FFFF0000"));

            WelComePage.payrecivedReff.Background = color;
            ModalService.NavigateTo(new ReceivePayment(), delegate(bool returnValue) { });
        }
Exemplo n.º 19
0
        public void Dashboard_Click()
        {
            clear();
            var Rcolor = (SolidColorBrush)(new BrushConverter().ConvertFrom("#FFFF0000"));
            var color  = (SolidColorBrush)(new BrushConverter().ConvertFrom("#f6f7f9"));

            WelComePage.ItemPRef.Background      = color;
            WelComePage.CustReff.Background      = color;
            WelComePage.VenReff.Background       = color;
            WelComePage.POrdReff.Background      = color;
            WelComePage.ReptdReff.Background     = color;
            WelComePage.SettingsReff.Background  = color;
            WelComePage.DashboardReff.Background = Rcolor;

            ModalService.NavigateTo(new Dashboard(), delegate(bool returnValue) { });
        }
Exemplo n.º 20
0
        public async void Update_Designation()
        {
            HttpClient client = new HttpClient();

            client.DefaultRequestHeaders.Accept.Add(
                new MediaTypeWithQualityHeaderValue("application/json"));
            client.BaseAddress = new Uri(GlobalData.gblApiAdress);
            var response = await client.PostAsJsonAsync("api/DesignationListAPI/DesignationUpdate/", selectDesignation);

            if (response.StatusCode.ToString() == "OK")
            {
                MessageBox.Show("Designation Update Successfully");
                Cancel_Designation();
                ModalService.NavigateTo(new DesignationList(), delegate(bool returnValue) { });
            }
        }
Exemplo n.º 21
0
        public async void Insert_Unit()
        {
            SelectedUnit.COMPANY_ID = Convert.ToInt32(App.Current.Properties["Company_Id"].ToString());
            HttpClient client = new HttpClient();

            client.DefaultRequestHeaders.Accept.Add(
                new MediaTypeWithQualityHeaderValue("application/json"));
            client.BaseAddress = new Uri(GlobalData.gblApiAdress);
            var response = await client.PostAsJsonAsync("api/UnitAPI/UnitAdd/", SelectedUnit);

            if (response.StatusCode.ToString() == "OK")
            {
                MessageBox.Show("Item Added Successfully");
                Cancel_Unit();
                ModalService.NavigateTo(new UnitList(), delegate(bool returnValue) { });
            }
        }
Exemplo n.º 22
0
        public async void Insert_Access()
        {
            App.Current.Properties["Action"] = "Add";
            HttpClient client = new HttpClient();

            client.BaseAddress = new Uri(GlobalData.gblApiAdress);
            client.DefaultRequestHeaders.Accept.Add(
                new MediaTypeWithQualityHeaderValue("application/json"));
            var response = await client.PostAsJsonAsync("api/AccessRightAPI/CreateAcessRight/", _Access_Temp);

            if (response.StatusCode.ToString() == "OK")
            {
                MessageBox.Show("Customer Insert Successfuly");
                Cancel_AccessRide();
                ModalService.NavigateTo(new AccessRide(), delegate(bool returnValue) { });
            }
        }
Exemplo n.º 23
0
        public async void Update_Catagory()
        {
            HttpClient client = new HttpClient();

            client.BaseAddress          = new Uri(GlobalData.gblApiAdress);
            SelectedCatagory.COMPANY_ID = Convert.ToInt32(App.Current.Properties["Company_Id"].ToString());
            client.DefaultRequestHeaders.Accept.Add(
                new MediaTypeWithQualityHeaderValue("application/json"));
            client.Timeout = new TimeSpan(500000000000);
            var response = await client.PostAsJsonAsync("api/CatagoryAPI/CatagoryUpdate/", SelectedCatagory);

            if (response.StatusCode.ToString() == "OK")
            {
                MessageBox.Show("Catagory Update Successfully");
                Cancel_Catagory();
                ModalService.NavigateTo(new CategoryList(), delegate(bool returnValue) { });
            }
        }
Exemplo n.º 24
0
        public async void Update_Loyalty()
        {
            if (App.Current.Properties["LoyltyCustomer"] != null)
            {
                selectedLoyalty.CUSTOMERGROUP = App.Current.Properties["LoyltyCustomer"].ToString();
            }
            HttpClient client = new HttpClient();

            client.DefaultRequestHeaders.Accept.Add(
                new MediaTypeWithQualityHeaderValue("application/json"));
            client.BaseAddress = new Uri(GlobalData.gblApiAdress);
            var response = await client.PostAsJsonAsync("api/LoyaltyAPI/LoyaltyUpdate/", selectedLoyalty);

            if (response.StatusCode.ToString() == "OK")
            {
                MessageBox.Show("Loyalty Update Successfully");
                Cancel_Loyalty();
                ModalService.NavigateTo(new LoyaltyList(), delegate(bool returnValue) { });
            }
        }
Exemplo n.º 25
0
        public async void Insert_Bank()
        {
            if (selectedBank.BANK_NAME == "" || selectedBank.BANK_NAME == null)
            {
                MessageBox.Show("BANK NAME  is missing");
            }
            else if (selectedBank.IFSC_CODE == "" || selectedBank.IFSC_CODE == null)
            {
                MessageBox.Show("IFSC CODE  is missing");
            }
            else if (selectedBank.PIN_CODE == "" || selectedBank.PIN_CODE == null)
            {
                MessageBox.Show("PIN CODE  is missing");
            }
            else if (selectedBank.MOBILE_NUMBER == "" || selectedBank.MOBILE_NUMBER == null)
            {
                MessageBox.Show("MOBILE NUMBER  is missing");
            }
            else if (selectedBank.WEBSITE == "" || selectedBank.WEBSITE == null)
            {
                MessageBox.Show("WEBSITE  is missing");
            }
            else
            {
                selectedBank.COMPANY_ID = Convert.ToInt32(App.Current.Properties["Company_Id"].ToString());
                HttpClient client = new HttpClient();
                client.DefaultRequestHeaders.Accept.Add(
                    new MediaTypeWithQualityHeaderValue("application/json"));
                client.BaseAddress = new Uri(GlobalData.gblApiAdress);
                var response = await client.PostAsJsonAsync("api/BankAPI/BankAdd/", selectedBank);

                if (response.StatusCode.ToString() == "OK")
                {
                    MessageBox.Show("Bank Added Successfully");
                    Cancel_Bank();
                    ModalService.NavigateTo(new BankList(), delegate(bool returnValue) { });
                }
            }
        }
Exemplo n.º 26
0
        public async void Insert_BankAC()
        {
            if (selectedBankAC.ACCOUNT_NUMBER == "" || selectedBankAC.ACCOUNT_NUMBER == null)
            {
                MessageBox.Show("ACCOUNT NUMBER is missing");
            }
            else if (selectedBankAC.ACCOUNT_SEARCH_CODE == "" || selectedBankAC.ACCOUNT_SEARCH_CODE == null)
            {
                MessageBox.Show("ACCOUNT SEARCH CODE  is missing");
            }
            else if (selectedBankAC.BRANCH_NAME == "" || selectedBankAC.BRANCH_NAME == null)
            {
                MessageBox.Show("BRANCH NAME  is missing");
            }
            else
            {
                selectedBankAC.COMPANY_ID = Convert.ToInt32(App.Current.Properties["Company_Id"].ToString());


                selectedBankAC.BANK_ID = Convert.ToInt64(App.Current.Properties["BankId"]);

                HttpClient client = new HttpClient();
                client.DefaultRequestHeaders.Accept.Add(
                    new MediaTypeWithQualityHeaderValue("application/json"));
                client.BaseAddress = new Uri(GlobalData.gblApiAdress);
                var response = await client.PostAsJsonAsync("api/BankAPI/BankAddAC/", selectedBankAC);

                if (response.StatusCode.ToString() == "OK")
                {
                    MessageBox.Show("Bank Account Added Successfully");
                    Cancel_Bank();
                    ModalService.NavigateTo(new BankList(), delegate(bool returnValue) { });
                }
                App.Current.Properties["BankId"] = null;
            }
        }
Exemplo n.º 27
0
        public void Report_List()
        {
            //var color = (SolidColorBrush)(new BrushConverter().ConvertFrom("#f6f7f9"));
            //var color2 = (SolidColorBrush)(new BrushConverter().ConvertFrom("#f6f7f9"));
            //var color3 = (SolidColorBrush)(new BrushConverter().ConvertFrom("#f6f7f9"));
            //var color4 = (SolidColorBrush)(new BrushConverter().ConvertFrom("#f6f7f9"));
            //var Rcolor = (SolidColorBrush)(new BrushConverter().ConvertFrom("#FFFF0000"));
            //WelComePage.ItemPRef.Background = color;
            //WelComePage.CustReff.Background = color2;
            //WelComePage.VenReff.Background = color3;
            //WelComePage.POrdReff.Background = color4;
            //WelComePage.ReptdReff.Background = Rcolor;
            //WelComePage.SettingsReff.Background = color;
            //WelComePage.DashboardReff.Background = color;

            clear();
            var color = (SolidColorBrush)(new BrushConverter().ConvertFrom("#FFFF0000"));

            WelComePage.ReportReff.Background = color;
            ModalService.NavigateTo(new ReportList(), delegate(bool returnValue) { });


            //ModalService.NavigateTo(new ReportList(), delegate(bool returnValue) { });
        }
Exemplo n.º 28
0
 public void SupplierList()
 {
     ModalService.NavigateTo(new SupplierList(), delegate(bool returnValue) { });
 }
Exemplo n.º 29
0
 public void AddCustomer()
 {
     ModalService.NavigateTo(new CustomerList(), delegate(bool returnValue) { });
 }
Exemplo n.º 30
0
        public async void Insert_Tax()
        {
            ////SelectedTax = App.Current.Properties["TaxPaList"] as TaxManagementModel;
            ////App.Current.Properties["TaxPaList"]

            //   App.Current.Properties["Tax"]=ListGrid;
            SelectedTax.COMPANY = App.Current.Properties["TaxCmpny"].ToString();
            //if (SelectedTax.COMPANY != null)
            //{
            //    if(SelectedItem1.COMPANY!=null)
            //{
            SelectedTax.COMPANY_ID = Convert.ToInt32(App.Current.Properties["Company_Id"].ToString());
            HttpClient client = new HttpClient();

            client.DefaultRequestHeaders.Accept.Add(
                new MediaTypeWithQualityHeaderValue("application/json"));
            client.BaseAddress = new Uri(GlobalData.gblApiAdress);
            var response = await client.PostAsJsonAsync("api/TaxAPI/TaxAdd/", SelectedTax);

            if (response.StatusCode.ToString() == "OK")
            {
                MessageBox.Show("Tax Added Successfully");
                Cancel_Tax();
                App.Current.Properties["TaxCmpny"] = null;
                //GetTaxList(SelectedTax.COMPANY_ID);
                ModalService.NavigateTo(new TaxList(), delegate(bool returnValue) { });
                //TaxList.CatGridRef.ItemsSource = null;
                //TaxList.CatGridRef.ItemsSource = _ListGrid_Temp.ToList();

                var        company = SelectedTax.COMPANY;
                HttpClient client1 = new HttpClient();
                client1.BaseAddress = new Uri(GlobalData.gblApiAdress);
                client1.DefaultRequestHeaders.Accept.Add(
                    new MediaTypeWithQualityHeaderValue("application/json"));
                client1.Timeout = new TimeSpan(500000000000);
                //HttpResponseMessage response = client.GetAsync("api/TaxAPI/GetTax?id=" + comp + " &&?id2="+company+"").Result;
                HttpResponseMessage response1 = client.GetAsync("api/TaxAPI/GetTax?id=" + company + "").Result;
                if (response1.IsSuccessStatusCode)
                {
                    data = JsonConvert.DeserializeObject <TaxManagementModel[]>(await response1.Content.ReadAsStringAsync());
                    _ListGrid_Temp.Clear();
                    for (int i = 0; i < data.Length; i++)
                    {
                        _ListGrid_Temp.Add(new TaxManagementModel
                        {
                            COMPANY_ID  = data[i].COMPANY_ID,
                            COMPANY     = data[i].COMPANY,
                            IS_DELETE   = data[i].IS_DELETE,
                            IS_SEPARATE = data[i].IS_SEPARATE,
                            TAX_ID      = data[i].TAX_ID,
                            TAX_NAME    = data[i].TAX_NAME,
                            TAX_VALUE   = data[i].TAX_VALUE,
                        });
                        TaxList1.Add(new AutoCompleteTax
                        {
                            DisplayName = data[i].TAX_NAME,
                            DisplayId   = data[i].TAX_ID
                        });
                    }

                    TaxList.ListGridRef.ItemsSource = _ListGrid_Temp;
                    //ListGrid2 = _ListGrid_Temp;
                    //ListGrid = _ListGrid_Temp;
                }
            }

            //}
            //else
            //{
            //    MessageBox.Show("Select Tax first", "Item Selection", MessageBoxButton.OK, MessageBoxImage.Error);
            //    return;
            //}
        }