Esempio n. 1
0
        private async Task <bool> checkFields()
        {
            bool ifAllCorrect = false;

            MahApps.Metro.Controls.MetroWindow window = Window.GetWindow(this) as MahApps.Metro.Controls.MetroWindow;

            if (string.IsNullOrEmpty(txtProductName.Text))
            {
                await window.ShowMessageAsync("PRODUCT NAME", "Please provide product name.");
            }
            else if (string.IsNullOrEmpty(txtDescription.Text))
            {
                await window.ShowMessageAsync("DESCRIPTION", "Please provide product description");
            }
            else if (string.IsNullOrEmpty(txtPrice.Text))
            {
                await window.ShowMessageAsync("DESCRIPTION", "Please provide product description");
            }
            else
            {
                ifAllCorrect = true;
            }

            return(ifAllCorrect);
        }
Esempio n. 2
0
        private async Task <bool> checkFields()
        {
            bool ifOkay = false;

            window = Window.GetWindow(this) as MahApps.Metro.Controls.MetroWindow;

            if (string.IsNullOrEmpty(dateDelivered.Text))
            {
                await window.ShowMessageAsync("Date", "Please select date.");
            }
            else if (cmbTollpacker.SelectedItem == null)
            {
                await window.ShowMessageAsync("Toll packer", "Please select toll packer.");
            }
            else if (string.IsNullOrEmpty(txtItemDescription.Text))
            {
                await window.ShowMessageAsync("Description", "Please input value.");
            }
            else if (string.IsNullOrEmpty(txtQty.Text))
            {
                await window.ShowMessageAsync("Quantity", "Please input value.");
            }
            else
            {
                ifOkay = true;
            }

            return(ifOkay);
        }
Esempio n. 3
0
        private async Task <bool> checkFields()
        {
            bool ifCorrect = false;

            window = Window.GetWindow(this) as MahApps.Metro.Controls.MetroWindow;
            if (string.IsNullOrEmpty(txtName.Text))
            {
                await window.ShowMessageAsync("NAME", "Please type name!");
            }
            else if (string.IsNullOrEmpty(txtUsername.Text))
            {
                await window.ShowMessageAsync("USERNAME", "Please type username!");
            }
            else if (string.IsNullOrEmpty(txtPassword.Password) && string.IsNullOrEmpty(txtVerifyPassword.Password))
            {
                await window.ShowMessageAsync("PASSWORD", "Please type password!");
            }
            else if (chkAdmin.IsChecked.Value && string.IsNullOrEmpty(txtPin.Text))
            {
                await window.ShowMessageAsync("PIN", "Please enter PIN!");
            }
            else
            {
                ifCorrect = true;
            }

            return(ifCorrect);
        }
Esempio n. 4
0
        private bool verifySearchFields()
        {
            bool ifAllCorrect = false;

            MahApps.Metro.Controls.MetroWindow window = Window.GetWindow(this) as MahApps.Metro.Controls.MetroWindow;

            if (checkDate.IsChecked == true)
            {
                if (string.IsNullOrEmpty(searchDateFrom.Text) && string.IsNullOrEmpty(searchDateTo.Text))
                {
                    window.ShowMessageAsync("Search: Date", "Please select date");
                }
            }
            else if (checkClient.IsChecked == true)
            {
                if (string.IsNullOrEmpty(searchClient.Text))
                {
                    window.ShowMessageAsync("Search: Client", "Please input client");
                }
            }
            else if (checkBank.IsChecked == true)
            {
                if (searchBank.SelectedItem == null)
                {
                    window.ShowMessageAsync("Search: Bank/Cash", "Please select bank or cash");
                }
            }
            else
            {
                ifAllCorrect = true;
            }

            return(ifAllCorrect);
        }
Esempio n. 5
0
        private async Task <bool> checkFields()
        {
            bool ifAllCorrect = false;

            MahApps.Metro.Controls.MetroWindow window = Window.GetWindow(this) as MahApps.Metro.Controls.MetroWindow;

            if (string.IsNullOrEmpty(txtFirstName.Text))
            {
                await window.ShowMessageAsync("FIRST NAME", "Please provide first name.");
            }
            else if (string.IsNullOrEmpty(txtLastName.Text))
            {
                await window.ShowMessageAsync("LAST NAME", "Please provide last name.");
            }
            else if (string.IsNullOrEmpty(txtUsername.Text))
            {
                await window.ShowMessageAsync("USERNAME", "Please provide username.");
            }
            else if (string.IsNullOrEmpty(txtPassword.Password))
            {
                await window.ShowMessageAsync("PASSWORD", "Please provide password.");
            }
            else
            {
                ifAllCorrect = true;
            }

            return(ifAllCorrect);
        }
Esempio n. 6
0
        private async Task <bool> checkFields()
        {
            bool ifAllCorrect = false;

            MahApps.Metro.Controls.MetroWindow window = Window.GetWindow(this) as MahApps.Metro.Controls.MetroWindow;

            if (string.IsNullOrEmpty(deliveryDate.Text))
            {
                await window.ShowMessageAsync("DELIVERY DATE", "Please select date.");
            }
            else if (string.IsNullOrEmpty(txtClientName.Text))
            {
                await window.ShowMessageAsync("CLIENT NAME", "Please provide client name.");
            }
            else if (string.IsNullOrEmpty(txtQuantity.Text))
            {
                await window.ShowMessageAsync("QUANTITY", "Please provide quantity.");
            }
            else if (cmbCategory.SelectedItem == null)
            {
                await window.ShowMessageAsync("CATEGORY", "Please select category.");
            }
            else
            {
                ifAllCorrect = true;
            }

            return(ifAllCorrect);
        }
Esempio n. 7
0
        private async Task <bool> checkFields()
        {
            bool ifAllCorrect = false;

            MahApps.Metro.Controls.MetroWindow window = Window.GetWindow(this) as MahApps.Metro.Controls.MetroWindow;

            if (string.IsNullOrEmpty(txtDrugstore.Text))
            {
                await window.ShowMessageAsync("DRUGSTORE NAME", "Please provide drugstore name.");
            }
            else if (string.IsNullOrEmpty(txtDescription.Text))
            {
                await window.ShowMessageAsync("DESCRIPTION", "Please provide drugstore description");
            }
            else if (string.IsNullOrEmpty(txtdues.Text))
            {
                await window.ShowMessageAsync("DUES", "Please provide days of payment due");
            }
            else
            {
                ifAllCorrect = true;
            }

            return(ifAllCorrect);
        }
Esempio n. 8
0
        private async Task <List <DrugstoresSales> > loadDataGridDetails()
        {
            List <DrugstoresSales> lstDrgs = new List <DrugstoresSales>();

            conDB = new ConnectionDB();
            try
            {
                MongoClient client = conDB.initializeMongoDB();
                var         db     = client.GetDatabase("DBFH");

                var collection = db.GetCollection <DrugstoresSales>("DrugstoresSales");

                var filter = Builders <DrugstoresSales> .Filter.And(
                    Builders <DrugstoresSales> .Filter.Where(p => p.isDeleted == false));

                lstDrgs = collection.Find(filter).ToList();

                foreach (DrugstoresSales ds in lstDrgs)
                {
                    ds.strDate = ds.DeliveryDate.ToShortDateString();
                }
            }
            catch (Exception ex)
            {
                await window.ShowMessageAsync("ERROR", "Caused by: " + ex.StackTrace);
            }
            return(lstDrgs);
        }
Esempio n. 9
0
 private async void btnSearch_Click(object sender, RoutedEventArgs e)
 {
     if (checkDate.IsChecked == true || checkClient.IsChecked == true || checkBank.IsChecked == true || checkPaidSearch.IsChecked == true)
     {
         if ((string.IsNullOrEmpty(searchDateFrom.Text) || string.IsNullOrEmpty(searchDateTo.Text)) && checkDate.IsChecked == true)
         {
             await window.ShowMessageAsync("SEARCH", "Please complete value to search.");
         }
         else if (checkClient.IsChecked == true && searchClient.Text == null)
         {
             await window.ShowMessageAsync("SEARCH", "Please complete value to search.");
         }
         else if (checkBank.IsChecked == true && searchBank.SelectedItem == null)
         {
             await window.ShowMessageAsync("SEARCH", "Please complete value to search.");
         }
         else if (checkPaidSearch.IsChecked == true && cmbSearchPaid.SelectedItem == null)
         {
             await window.ShowMessageAsync("SEARCH", "Please complete value to search.");
         }
         else
         {
             dgvDirectSales.ItemsSource = search();
         }
     }
 }
        private async void btnDelete_Click(object sender, RoutedEventArgs e)
        {
            EmployeeModel emMod = dgvEmployees.SelectedItem as EmployeeModel;

            MahApps.Metro.Controls.MetroWindow window = Window.GetWindow(this) as MahApps.Metro.Controls.MetroWindow;

            if (emMod != null)
            {
                MessageDialogResult result = await window.ShowMessageAsync("Delete Record", "Are you sure you want to delete record?", MessageDialogStyle.AffirmativeAndNegative);

                if (result.Equals(MessageDialogResult.Affirmative))
                {
                    deleteRecord(emMod.ID);
                    dgvEmployees.ItemsSource = loadDataGridDetails();
                    await window.ShowMessageAsync("Delete Record", "Record deleted successfully!");
                }
            }
        }
Esempio n. 11
0
        private async void btnDelete_Click(object sender, RoutedEventArgs e)
        {
            window = Window.GetWindow(this) as MahApps.Metro.Controls.MetroWindow;

            PayrollModel pm = dgvEmployees.SelectedItem as PayrollModel;

            if (pm != null)
            {
                MessageDialogResult result = await window.ShowMessageAsync("Delete Payroll", "Are you sure you want to delete payroll?", MessageDialogStyle.AffirmativeAndNegative);

                if (result.Equals(MessageDialogResult.Affirmative))
                {
                    deleteRecord(pm.ID);
                    dgvEmployees.ItemsSource = loadDataGridDetails();
                    await window.ShowMessageAsync("Delete Record", "Record deleted successfully!");

                    conDB.writeLogFile("DELETE EMPLOYEE PAYROLL:  ID: " + pm.ID);
                }
            }
        }
        private async Task <bool> checkFields()
        {
            bool bl = false;

            window = Window.GetWindow(this) as MahApps.Metro.Controls.MetroWindow;

            if (string.IsNullOrEmpty(txtCompanyName.Text))
            {
                await window.ShowMessageAsync("COMPANY NAME", "Please provide company name.");
            }
            else if (string.IsNullOrEmpty(txtDescription.Text))
            {
                await window.ShowMessageAsync("Description", "Please provide description");
            }
            else
            {
                bl = true;
            }
            return(bl);
        }
Esempio n. 13
0
        private async void btnSearch_Click(object sender, RoutedEventArgs e)
        {
            MahApps.Metro.Controls.MetroWindow window = Window.GetWindow(this) as MahApps.Metro.Controls.MetroWindow;

            if (checkDate.IsChecked == true || checkCategory.IsChecked == true)
            {
                if ((string.IsNullOrEmpty(searchDateFrom.Text) || string.IsNullOrEmpty(searchDateTo.Text)) && checkDate.IsChecked == true)
                {
                    await window.ShowMessageAsync("SEARCH", "Please complete value to search.");
                }
                else if (checkCategory.IsChecked == true && searchCategory.SelectedItem == null)
                {
                    await window.ShowMessageAsync("SEARCH", "Please complete value to search.");
                }
                else
                {
                    dgvFreebies.ItemsSource = search();
                }
            }
        }
Esempio n. 14
0
        private async Task <bool> checkFields()
        {
            bool ifOkay = false;

            MahApps.Metro.Controls.MetroWindow window = Window.GetWindow(this) as MahApps.Metro.Controls.MetroWindow;

            if (string.IsNullOrEmpty(txtTollPacker.Text))
            {
                await window.ShowMessageAsync("Toll Packer", "Please input name.");
            }
            else if (string.IsNullOrEmpty(txtDescription.Text))
            {
                await window.ShowMessageAsync("Description", "Please input description.");
            }
            else
            {
                ifOkay = true;
            }

            return(ifOkay);
        }
Esempio n. 15
0
        private async Task <bool> checkFields()
        {
            bool ifAllCorrect = false;

            MahApps.Metro.Controls.MetroWindow window = Window.GetWindow(this) as MahApps.Metro.Controls.MetroWindow;

            if (string.IsNullOrEmpty(deliveryDate.Text))
            {
                await window.ShowMessageAsync("DELIVERY DATE", "Please select date.");
            }
            else if (string.IsNullOrEmpty(txtSmallDrugstore.Text))
            {
                await window.ShowMessageAsync("DRUG STORE", "Please select drug store.");
            }
            else
            {
                ifAllCorrect = true;
            }

            return(ifAllCorrect);
        }
Esempio n. 16
0
        private async Task <List <Users> > loadDataGridDetails()
        {
            List <Users> lstAgnts = new List <Users>();

            conDB = new ConnectionDB();
            try
            {
                MongoClient client     = conDB.initializeMongoDB();
                var         db         = client.GetDatabase("DBFH");
                var         collection = db.GetCollection <Users>("Users");
                var         filter     = Builders <FHSales.MongoClasses.Users> .Filter.And(
                    Builders <Users> .Filter.Where(p => p.isDeleted == false));

                lstAgnts = collection.Find(filter).ToList();
            }
            catch (Exception ex)
            {
                await window.ShowMessageAsync("ERROR", "Caused by: " + ex.StackTrace);
            }
            return(lstAgnts);
        }
Esempio n. 17
0
        public void disconnect()
        {
            ThisWindow.Close();
            MainWindow x = new MainWindow();

            x.Show();
            MahApps.Metro.Controls.MetroWindow wd = Window.GetWindow(x) as MahApps.Metro.Controls.MetroWindow;
            if (wd != null)
            {
                wd.ShowMessageAsync("You were Disconnected ", " You were disconnected and sent back to login Window");
            }
        }
Esempio n. 18
0
        private async void btnSearch_Click(object sender, RoutedEventArgs e)
        {
            MahApps.Metro.Controls.MetroWindow window = Window.GetWindow(this) as MahApps.Metro.Controls.MetroWindow;

            if (string.IsNullOrEmpty(searchName.Text))
            {
                await window.ShowMessageAsync("Search Name", "Please provide name");
            }
            else
            {
                dgvclientmega.ItemsSource = searchStockist();
            }
        }
Esempio n. 19
0
        private async void btnSave_Click(object sender, RoutedEventArgs e)
        {
            bool x = await checkFields();

            window = Window.GetWindow(this) as MahApps.Metro.Controls.MetroWindow;
            if (x)
            {
                saveRecord();
                clearFields();
                dgvStocks.ItemsSource = loadDatagridDetails();
                await window.ShowMessageAsync("Save record", "Records successfully saved.");
            }
        }
        private async void btnSave_Click(object sender, RoutedEventArgs e)
        {
            bool x = await checkFields();

            if (x)
            {
                saveSSSRecord();
                dgvElecBill.ItemsSource = getElecBillRecord();
                await window.ShowMessageAsync("RECORD SAVED", "Record successfully saved.");

                clearFields();
            }
        }
Esempio n. 21
0
        private async void btnUpdate_Click(object sender, RoutedEventArgs e)
        {
            bool x = await checkFields();

            MahApps.Metro.Controls.MetroWindow window = Window.GetWindow(this) as MahApps.Metro.Controls.MetroWindow;

            if (x)
            {
                updateRecord(recID);
                clearFields();
                dgvTollPacker.ItemsSource = loadDataGridDetails();
                await window.ShowMessageAsync("Update Record", "Record updated successfully!");
            }
        }
Esempio n. 22
0
        private async void btnAddDR_Click(object sender, RoutedEventArgs e)
        {
            MahApps.Metro.Controls.MetroWindow window = Window.GetWindow(this) as MahApps.Metro.Controls.MetroWindow;

            if (viewMegaStockist != null)
            {
                OrderWindow ow = new OrderWindow(viewMegaStockist, null);
                ow.ShowDialog();
            }
            else
            {
                await window.ShowMessageAsync("ADDING DR", "Please click View DR for selected client.");
            }
        }
Esempio n. 23
0
        private async void btnUpdate_Click(object sender, RoutedEventArgs e)
        {
            MahApps.Metro.Controls.MetroWindow window = Window.GetWindow(this) as MahApps.Metro.Controls.MetroWindow;

            updateRecord(recordID);
            await window.ShowMessageAsync("UPDATE RECORD", "Record updated successfully!");

            dgvFreebies.ItemsSource = loadDataGridDetails();
            txtCategory.Text        = "";
            txtDescription.Text     = "";
            recordID             = "";
            btnUpdate.Visibility = Visibility.Hidden;
            btnSave.Visibility   = Visibility.Visible;
        }
        private async Task <bool> checkFields()
        {
            bool bl = false;

            window = Window.GetWindow(this) as MahApps.Metro.Controls.MetroWindow;
            if (string.IsNullOrEmpty(dateIS.Text))
            {
                await window.ShowMessageAsync("DATE", "Please select date.");
            }
            else if (string.IsNullOrEmpty(txtElecBill.Text) || !ifValidFloatingNumber(txtElecBill.Text))
            {
                await window.ShowMessageAsync("Electric Bill", "Please input valid Electric bill value.");
            }
            else if (cmbEmployees.SelectedItem == null)
            {
                await window.ShowMessageAsync("Employees", "Please select an employee.");
            }
            else
            {
                bl = true;
            }

            return(bl);
        }
Esempio n. 25
0
        private async void btnUpdate_Click(object sender, RoutedEventArgs e)
        {
            bool blCorrect = await checkFields();

            MahApps.Metro.Controls.MetroWindow window = Window.GetWindow(this) as MahApps.Metro.Controls.MetroWindow;

            if (blCorrect)
            {
                updateRecord(freebiesModel);
                clearFields();
                await window.ShowMessageAsync("UPDATE RECORD", "Record updated successfully!");

                dgvFreebies.ItemsSource = loadDataGridDetails();
            }
        }
Esempio n. 26
0
        private async void btnSave_Click(object sender, RoutedEventArgs e)
        {
            bool bl = await checkFields();

            if (bl)
            {
                MahApps.Metro.Controls.MetroWindow window = Window.GetWindow(this) as MahApps.Metro.Controls.MetroWindow;

                saveRecord();
                await window.ShowMessageAsync("SAVE RECORD", "Record saved successfully!");

                dgvFreebies.ItemsSource = loadDataGridDetails();
                clearFields();
            }
        }
Esempio n. 27
0
        //private async Task<List<DirectSales>> loadDataGridDetails()
        //{
        //    List<DirectSales> lstDS = new List<DirectSales>();
        //    conDB = new ConnectionDB();
        //    try
        //    {
        //        MongoClient client = conDB.initializeMongoDB();
        //        var db = client.GetDatabase("DBFH");
        //        var collection = db.GetCollection<DirectSales>("DirectSales");
        //        var filter = Builders<DirectSales>.Filter.And(
        //Builders<DirectSales>.Filter.Where(p => p.isDeleted == false));
        //        lstDS = collection.Find(filter).ToList();
        //    }
        //    catch (Exception ex)
        //    {
        //        await window.ShowMessageAsync("ERROR", "Caused by: " + ex.StackTrace);
        //    }
        //    return lstDS;
        //}

        //private async void loadSalesOfficesOnCombo()
        //{
        //    try
        //    {
        //        cmbSalesOffice.Items.Clear();
        //        cmbSalesOffice.Items.Clear();
        //        conDB = new ConnectionDB();
        //        MongoClient client = conDB.initializeMongoDB();
        //        var db = client.GetDatabase("DBFH");
        //        var collection = db.GetCollection<SalesOffices>("SalesOffices");
        //        var filter = Builders<SalesOffices>.Filter.And(
        //Builders<SalesOffices>.Filter.Where(p => p.isDeleted == false));
        //        List<SalesOffices> lstPayments = collection.Find(filter).ToList();
        //        foreach (SalesOffices p in lstPayments)
        //        {

        //            cmbSalesOffice.Items.Add(p);
        //        }
        //    }
        //    catch (Exception ex)
        //    {
        //        await window.ShowMessageAsync("EXCEPTION", "ERROR LOADING DATA " + ex.Message);
        //    }
        //}

        //private async void loadPaymentModeOnCombo()
        //{
        //    try
        //    {
        //        cmbCashBank.Items.Clear();
        //        searchBank.Items.Clear();
        //        conDB = new ConnectionDB();
        //        MongoClient client = conDB.initializeMongoDB();
        //        var db = client.GetDatabase("DBFH");
        //        var collection = db.GetCollection<Banks>("Banks");
        //        var filter = Builders<Banks>.Filter.And(
        //Builders<Banks>.Filter.Where(p => p.isDeleted == false));
        //        List<Banks> lstPayments = collection.Find(filter).ToList();
        //        foreach (Banks p in lstPayments)
        //        {

        //            cmbCashBank.Items.Add(p);
        //            searchBank.Items.Add(p);
        //        }
        //    }
        //    catch (Exception ex)
        //    {
        //        await window.ShowMessageAsync("EXCEPTION", "ERROR LOADING DATA " + ex.Message);
        //    }
        //}

        //private void loadPaidCombo()
        //{
        //    cmbSearchPaid.Items.Clear();
        //    cmbSearchPaid.Items.Add("PAID");
        //    cmbSearchPaid.Items.Add("UNPAID");
        //}

        //private async void loadCourierOnCombo()
        //{
        //    try
        //    {
        //        cmbCourier.Items.Clear();

        //        conDB = new ConnectionDB();
        //        MongoClient client = conDB.initializeMongoDB();
        //        var db = client.GetDatabase("DBFH");
        //        var collection = db.GetCollection<Couriers>("Couriers");
        //        var filter = Builders<Couriers>.Filter.And(
        //Builders<Couriers>.Filter.Where(p => p.isDeleted == false));
        //        List<Couriers> lstPayments = collection.Find(filter).ToList();
        //        foreach (Couriers p in lstPayments)
        //        {
        //            cmbCourier.Items.Add(p);
        //        }
        //    }
        //    catch (Exception ex)
        //    {
        //        await window.ShowMessageAsync("EXCEPTION", "ERROR LOADING DATA " + ex.Message);
        //    }
        //}

        //private async void saveRecord()
        //{
        //    SalesOffices so = cmbSalesOffice.SelectedItem as SalesOffices;
        //    Banks bank = cmbCashBank.SelectedItem as Banks;
        //    Couriers courier = cmbCourier.SelectedItem as Couriers;
        //    try
        //    {
        //        conDB = new ConnectionDB();
        //        MongoClient client = conDB.initializeMongoDB();
        //        var db = client.GetDatabase("DBFH");
        //        DirectSales ds = new DirectSales();
        //        ds.SalesOffice = so;

        //        DateTime dte = DateTime.Parse(deliveryDateDS.Text);
        //        ds.DeliveryDate = DateTime.Parse(dte.ToLocalTime().ToShortDateString());

        //        ds.ClientName = txtClientName.Text;
        //        ds.Bank = bank;
        //        ds.Courier = courier;
        //        ds.Expenses = txtExpenses.Text;
        //        ds.Total = txtTotalPrice.Text;
        //        ds.Remarks = txtRemarks.Text;

        //        var collection = db.GetCollection<DirectSales>("DirectSales");
        //        collection.InsertOne(ds);
        //    }
        //    catch (Exception ex)
        //    {
        //        await window.ShowMessageAsync("ERROR", "Caused by: " + ex.StackTrace);
        //    }
        //}

        private async void btnSave_Click(object sender, RoutedEventArgs e)
        {
            bool bl = await checkFields();

            MahApps.Metro.Controls.MetroWindow window = Window.GetWindow(this) as MahApps.Metro.Controls.MetroWindow;

            if (bl)
            {
                if (lstProductModel.Count <= 0)
                {
                    await window.ShowMessageAsync("SAVE ERROR", "PRODUCT LIST IS EMPTY.");
                }
                else
                {
                    int id = saveDirectSalesRecord();
                    saveProductsOnList(id.ToString());
                    await window.ShowMessageAsync("SAVE RECORD", "Record saved successfully!");

                    dgvDirectSales.ItemsSource = loadDataGridDetailsDirectSales();
                    lstProductModel            = new List <ProductModel>();
                    clearFields();
                }
            }
        }
        private async void btnSave_Click(object sender, RoutedEventArgs e)
        {
            bool x = await checkFields();

            window = Window.GetWindow(this) as MahApps.Metro.Controls.MetroWindow;

            if (x)
            {
                saveCompany();
                await window.ShowMessageAsync("SAVE RECORD", "Record saved successfully!");

                dgvDepartments.ItemsSource = loadDataGridDetails();
                dgvDepartments.Items.Refresh();
                clearFields();
            }
        }
Esempio n. 29
0
        private async Task <bool> checkifPasswordSame()
        {
            bool ifSame = false;

            window = Window.GetWindow(this) as MahApps.Metro.Controls.MetroWindow;
            if (txtPassword.Password.Equals(txtVerifyPassword.Password))
            {
                ifSame = true;
            }
            else
            {
                await window.ShowMessageAsync("PASSWORD", "Password mismatch!");
            }

            return(ifSame);
        }
Esempio n. 30
0
        private async void btnSave_Click(object sender, RoutedEventArgs e)
        {
            bool bl = await checkFields();

            MahApps.Metro.Controls.MetroWindow window = Window.GetWindow(this) as MahApps.Metro.Controls.MetroWindow;

            if (bl)
            {
                saveRecord();
                txtBankName.Text     = "";
                txtDescription.Text  = "";
                dgvBanks.ItemsSource = await loadDataGridDetails();

                await window.ShowMessageAsync("SAVE RECORD", "Record saved successfully!");
            }
        }