コード例 #1
0
        private void Edit_Click(object sender, RoutedEventArgs e)
        {
            EditDialogView handle = new EditDialogView();

            if (handle.ShowDialog() == true)
            {
                if (handle.FirstInput != handle.SecondInput)
                {
                    MessageBox.Show("Entry No. did not match.Try again.\n", "Warning", MessageBoxButton.OK, MessageBoxImage.Exclamation);
                    return;
                }
                Connection conn = new Connection();
                conn.OpenConection();
                string        query  = "SELECT * From LoanCollection WHERE LoanCollection_Id = " + handle.FirstInput;
                SqlDataReader reader = conn.DataReader(query);
                if (reader == null)
                {
                    return;
                }
                while (reader.Read())
                {
                    EntryNo.Text       = reader["LoanCollection_Id"].ToString();
                    Id                 = Convert.ToInt32(EntryNo.Text);
                    Collection.Text    = reader["LoanCollection_Collection"].ToString();
                    InstallmentNo.Text = reader["LoanCollection_Installment"].ToString();
                }

                conn.CloseConnection();
                Save.Content = "Update";
            }
        }
コード例 #2
0
        private void Edit_Click(object sender, RoutedEventArgs e)
        {
            EditDialogView handle = new EditDialogView();

            if (handle.ShowDialog() == true)
            {
                if (handle.FirstInput != handle.SecondInput)
                {
                    MessageBox.Show("Entry No. did not match.Try again.\n", "Warning", MessageBoxButton.OK, MessageBoxImage.Exclamation);
                    return;
                }
                Connection conn = new Connection();
                conn.OpenConection();
                string        query  = "SELECT * From FixedDepositLedger WHERE FixedEntryId = " + handle.FirstInput;
                SqlDataReader reader = conn.DataReader(query);
                if (reader == null)
                {
                    return;
                }
                while (reader.Read())
                {
                    EntryNo.Text      = reader["FixedEntryId"].ToString();
                    Id                = Convert.ToInt32(EntryNo.Text);
                    Date.SelectedDate = (DateTime)reader["FixedDate"];
                    Details.Text      = (string)reader["FixedDetails"];
                    Deposit.Text      = reader["FixedDeposit"].ToString();
                    Withdraw.Text     = reader["FixedWithdraw"].ToString();
                }

                conn.CloseConnection();
                Save.Content = "Update";
            }
        }
コード例 #3
0
        private void Edit_Click(object sender, RoutedEventArgs e)
        {
            EditDialogView handle = new EditDialogView();

            if (handle.ShowDialog() == true)
            {
                if (handle.FirstInput != handle.SecondInput)
                {
                    MessageBox.Show("Entry No. did not match.Try again.\n", "Warning", MessageBoxButton.OK, MessageBoxImage.Exclamation);
                    return;
                }
                Connection conn = new Connection();
                conn.OpenConection();
                string        query  = "SELECT * From CooperativeDevelopment WHERE Cooperative_Id = " + handle.FirstInput;
                SqlDataReader reader = conn.DataReader(query);
                if (reader == null)
                {
                    return;
                }
                while (reader.Read())
                {
                    EntryNo.Text      = reader["Cooperative_Id"].ToString();
                    Id                = Convert.ToInt32(EntryNo.Text);
                    Date.SelectedDate = (DateTime)reader["Cooperative_Date"];
                    Current.Text      = reader["Cooperative_Current"].ToString();
                    Paid.Text         = reader["Cooperative_Paid"].ToString();
                }

                conn.CloseConnection();
                Save.Content = "Update";
            }
        }
コード例 #4
0
        private void Edit_Click(object sender, RoutedEventArgs e)
        {
            EditDialogView handle = new EditDialogView();

            if (handle.ShowDialog() == true)
            {
                if (handle.FirstInput != handle.SecondInput)
                {
                    MessageBox.Show("Entry No. did not match.Try again.\n", "Warning", MessageBoxButton.OK, MessageBoxImage.Exclamation);
                    return;
                }
                Connection conn = new Connection();
                conn.OpenConection();
                string        query  = "SELECT * From OfficeRent WHERE Office_Id = " + handle.FirstInput;
                SqlDataReader reader = conn.DataReader(query);
                if (reader == null)
                {
                    return;
                }
                while (reader.Read())
                {
                    EntryNo.Text      = reader["Office_Id"].ToString();
                    Date.SelectedDate = (DateTime)reader["Office_Date"];
                    Month.Text        = (string)reader["Office_Month"];
                    Advance.Text      = reader["Office_Advance"].ToString();
                    Rent.Text         = reader["Office_Rent"].ToString();
                }

                conn.CloseConnection();
                Save.Content = "Update";
            }
        }
コード例 #5
0
        private void Edit_Click(object sender, RoutedEventArgs e)
        {
            EditDialogView handle = new EditDialogView();

            handle.ChangeLabelForMember();
            if (handle.ShowDialog() == true)
            {
                if (handle.FirstInput != handle.SecondInput)
                {
                    MessageBox.Show("Member ID did not match.Try again.\n", "Warning", MessageBoxButton.OK, MessageBoxImage.Exclamation);
                    return;
                }
                MonthlyDepositEntryView GDEntryObj = new MonthlyDepositEntryView();
                GDEntryObj.SetForEdit(handle.FirstInput);
                GDEntryObj.SaveMember.Content = "Update Account";
                this.NavigationService.Navigate(GDEntryObj);
            }
        }
コード例 #6
0
        private void Edit_Click(object sender, RoutedEventArgs e)
        {
            EditDialogView handle = new EditDialogView();

            handle.ChangeLabelForStuff();
            if (handle.ShowDialog() == true)
            {
                if (handle.FirstInput != handle.SecondInput)
                {
                    MessageBox.Show("Stuff ID did not match.Try again.\n", "Warning", MessageBoxButton.OK, MessageBoxImage.Exclamation);
                    return;
                }
                StuffEntryView StfEntryObj = new StuffEntryView();
                StfEntryObj.SetForEdit(handle.FirstInput);
                StfEntryObj.SaveStuff.Content = "Update Stuff";
                this.NavigationService.Navigate(StfEntryObj);
            }
        }
コード例 #7
0
        private void Edit_Click(object sender, RoutedEventArgs e)
        {
            EditDialogView handle = new EditDialogView();

            if (handle.ShowDialog() == true)
            {
                if (handle.FirstInput != handle.SecondInput)
                {
                    MessageBox.Show("Entry No. did not match.Try again.\n", "Warning", MessageBoxButton.OK, MessageBoxImage.Exclamation);
                    return;
                }
                Connection conn = new Connection();
                conn.OpenConection();
                string        query  = "SELECT * From LaonDetails WHERE LoanDetails_Id = " + handle.FirstInput;
                SqlDataReader reader = conn.DataReader(query);
                if (reader == null)
                {
                    return;
                }
                while (reader.Read())
                {
                    EntryNo.Text              = reader["LoanDetails_Id"].ToString();
                    Id                        = Convert.ToInt32(EntryNo.Text);
                    AccountId.Text            = (string)reader["LoanDetails_Account"];
                    Sector.Text               = reader["LoanDetails_Sector"].ToString();
                    Amount.Text               = reader["LoanDetails_Amount"].ToString();
                    ServiceCharge.Text        = reader["LoanDetails_Service"].ToString();
                    SanctionDate.SelectedDate = (DateTime)reader["LoanDetails_Sanction"];
                    LifeTime.Text             = reader["LoanDetails_Lifetime"].ToString();
                    Installment.Text          = reader["LoanDetails_Installment"].ToString();
                }

                conn.CloseConnection();
                Save.Content = "Update";
            }
        }