Ejemplo n.º 1
0
        private void label7_Click(object sender, EventArgs e)
        {
            PeopleService.PeopleServiceClient a = new PeopleService.PeopleServiceClient();
            bool t = a.GetPerson(dataGridView1.SelectedRows[0].Cells["NatinalCode"].Value.ToString()).IsActive;

            if (t)
            {
                if (MessageBox.Show("آیا از بستن حساب اطمینان دارید؟", "خطا", MessageBoxButtons.YesNo) == DialogResult.Yes)
                {
                    Status.StatusClient SC = new Status.StatusClient();
                    SC.SetActive(dataGridView1.SelectedRows[0].Cells["NatinalCode"].Value.ToString(), false);
                    a = new PeopleService.PeopleServiceClient();
                    dataGridView1.DataSource = a.GetPeople().Select(x => new { x.NationalCode, x.FirstName, x.LastName, x.FathersName, x.Tel, x.Mobile, x.IsActive }).ToList();
                }
            }
            else
            {
                if (MessageBox.Show("آیا از بازکردن حساب اطمینان دارید؟", "خطا", MessageBoxButtons.YesNo) == DialogResult.Yes)
                {
                    Status.StatusClient SC = new Status.StatusClient();
                    SC.SetActive(dataGridView1.SelectedRows[0].Cells["NatinalCode"].Value.ToString(), true);
                    a = new PeopleService.PeopleServiceClient();
                    dataGridView1.DataSource = a.GetPeople().Select(x => new { x.NationalCode, x.FirstName, x.LastName, x.FathersName, x.Tel, x.Mobile, x.IsActive }).ToList();
                }
            }
        }
Ejemplo n.º 2
0
        private void AdminHome_Load(object sender, EventArgs e)
        {
            InstallementsService.InstallementsServiceClient a = new InstallementsService.InstallementsServiceClient();
            dataGridView1.DataSource = a.GetPeopleInstallements().Select(x => new { x.InstallementId, x.Fullname, x.NationalCode, x.Amount, x.PaymentDate, x.InstallementIsPayed }).Where(x => x.InstallementIsPayed == false && x.PaymentDate <= System.DateTime.Now).ToList();

            LoanTransactionsService.LoanTransactionsServiceClient b = new LoanTransactionsService.LoanTransactionsServiceClient();
            dataGridView2.DataSource = b.GetPeopleLoanTransactions().Select(x => new { x.LoanId, x.Fullname, x.NationalCode, x.Amount, x.DateTime, x.AdminPermission }).Where(x => x.AdminPermission == false).ToList();

            DepositTransactionsService.DepositTransactionsServiceClient c = new DepositTransactionsService.DepositTransactionsServiceClient();
            dataGridView3.DataSource = c.GetPeopleDepositTransactions().Select(x => new { x.DepositId, x.Fullname, x.NationalCode, x.Amount, x.BankFollowUpCode, x.DateTime, x.AdminPermission }).Where(x => x.AdminPermission == false).ToList();

            Status.StatusClient d = new Status.StatusClient();
            var bank = d.GetPeopleBank();

            label15.Text = bank.Loan.ToString();
            label14.Text = bank.Deposit.ToString();
            label12.Text = bank.NonPayedInstallements.ToString();
            label13.Text = bank.PayedInstallements.ToString();
            label10.Text = bank.Amount.ToString();
            PeopleService.PeopleServiceClient j = new PeopleService.PeopleServiceClient();
            var q = j.GetPerson(Data.NationalCode);

            label4.Text = "نام : " + q.FirstName;
            label1.Text = "نام خانوادگی : " + q.LastName;
            label3.Text = "کد ملی : " + q.NationalCode;
            label5.Text = "تاریخ افتتاح " + q.CreateDateTime;
        }
        private void PayedInstallment_Load(object sender, EventArgs e)
        {
            InstallementsService.InstallementsServiceClient a = new InstallementsService.InstallementsServiceClient();
            var b = a.GetPeopleInstallements().Select(x => new { x.InstallementId, x.Fullname, x.NationalCode, x.Amount, x.PaymentDate, x.InstallementIsPayed }).Where(x => x.InstallementIsPayed == false && x.PaymentDate <= System.DateTime.Now).ToList();



            NationalCode.Text = b[0].NationalCode;
            LastName.Text     = b[0].Fullname;
            Phone.Text        = new PeopleService.PeopleServiceClient().GetPerson(b[0].NationalCode).Mobile;
            Amount.Text       = b[0].Amount.ToString();
            Status.StatusClient c = new Status.StatusClient();
            Mojododi.Text = c.GetPeopleBank().Amount.ToString();
        }