Exemplo n.º 1
0
        private void frmLoanPayBack_Load(object sender, EventArgs e)
        {
            CommonUtil.SetinitGridView(dgvMember);
            CommonUtil.AddGridTextColumn(dgvMember, "대출번호", "LoanNum");
            CommonUtil.AddGridTextColumn(dgvMember, "담보제공예금계좌번호", "DAccountNum", 150);
            CommonUtil.AddGridTextColumn(dgvMember, "대출금액", "AmountOfLoan");
            CommonUtil.AddGridTextColumn(dgvMember, "만기일시상환금액", "ReturnWhenExpired", 150);
            CommonUtil.AddGridTextColumn(dgvMember, "대출금상환방법", "PayBackMethod");
            CommonUtil.AddGridTextColumn(dgvMember, "대출목적", "Purpose");
            CommonUtil.AddGridTextColumn(dgvMember, "대출기간", "LoanExpire");
            CommonUtil.AddGridTextColumn(dgvMember, "출금계좌", "NAccountNum");
            CommonUtil.AddGridTextColumn(dgvMember, "출금계좌비밀번호", "Pwd");
            CommonUtil.AddGridTextColumn(dgvMember, "대출시작일시", "LoanStarted");
            CommonUtil.AddGridTextColumn(dgvMember, "대출금리", "InterestRate");
            CommonUtil.AddGridTextColumn(dgvMember, "정규상환일", "RegularPayBackDate");
            CommonUtil.AddGridTextColumn(dgvMember, "고객번호", "CustomerNum");
            CommonUtil.AddGridTextColumn(dgvMember, "고객이름", "CustomerName");
            CommonUtil.AddGridTextColumn(dgvMember, "남은 상환 금액", "LoanLeftOver");

            LoanDB db = new LoanDB();

            dgvMember.DataSource = db.GetEveryData(CustomerNum);

            txtPayBack.Text = "0";
        }
Exemplo n.º 2
0
        private void btnMonthlyLoan_Click(object sender, EventArgs e)       //기간별 대출 건수
        {
            if (!dtpCheck())
            {
                return;
            }
            LoanDB    db = new LoanDB();
            DataTable dt = db.LoanPerPeriod(dtpTime1, dtpTime2);

            if (dt == null)
            {
                MessageBox.Show("해당하는 자료가 없습니다.");
                return;
            }
            chart1.Series.Clear();
            chart1.Series.Add(new Series("Series3"));
            for (int i = 0; i < dt.Rows.Count; i++)
            {
                chart1.Series["Series3"].Points.AddXY(dt.Rows[i][0].ToString().Substring(0, 10), dt.Rows[i][1]);
                chart1.Series["Series3"].ToolTip = $"#VALY";
            }

            chart1.Series["Series3"].ChartType   = SeriesChartType.Line;
            chart1.Series["Series3"].BorderWidth = 5;
            chart1.Series["Series3"].LegendText  = "기간별 대출 건수";
        }
Exemplo n.º 3
0
        private void btnAvg_Click(object sender, EventArgs e)       //평균 대출액
        {
            LoanDB    db = new LoanDB();
            DataTable dt = db.MonthlyAvgLoan();

            chart1.Series.Clear();
            chart1.Series.Add(new Series("Series2"));

            if (dt != null)
            {
                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    chart1.Series["Series2"].Points.AddXY(dt.Rows[i][0].ToString(), dt.Rows[i][1].ToString());
                    chart1.Series["Series2"].ToolTip = $"#VALY";
                }
                //chart1.Series["Series2"].Points.DataBind(dt.DefaultView, "month(LoanStarted)", "AVGloan", "ToolTip=AVGloan ");
                chart1.Series["Series2"].ChartType   = SeriesChartType.Line;
                chart1.Series["Series2"].BorderWidth = 5;


                chart1.Series["Series2"].LegendText = "월별 평균 대출액";
            }
            else
            {
                MessageBox.Show("자료를 가져오지 못했습니다.");
            }
        }
        private void btnSelect_Click(object sender, EventArgs e)        //대출 조회 버튼
        {
            //디비 열어서 현재 대출 상황 보여주기
            LoanDB    db = new LoanDB();
            DataTable dt = db.GetEveryData(CustomerNum);

            if (dt != null)
            {
                dgvMember.DataSource = dt;
            }
            else
            {
                MessageBox.Show("대출 내역이 존재하지 않습니다.");
            }
        }
        private void btnOK_Click(object sender, EventArgs e)
        {
            LoanDB db = new LoanDB();

            if (db.Update(txtLoanWillBeLeftOver.Text, LoanNum))
            {
                MessageBox.Show("성공적으로 대출이 상환되었습니다.");
                this.Close();
            }
            else
            {
                MessageBox.Show("과정에 오류가 있습니다. 다시 시도해주세요.");
                return;
            }
            db.Dispose();
        }
Exemplo n.º 6
0
        private void btnDay_Click(object sender, EventArgs e)       //연체율
        {
            // dtpCheck();
            LoanDB    db = new LoanDB();
            DataTable dt = db.DelayRate();

            chart1.Series.Clear();
            chart1.Series.Add(new Series("Series1"));

            chart1.Series["Series1"].Points.AddXY("Loan Delayed", dt.Rows[0][0].ToString());
            chart1.Series["Series1"].ToolTip = dt.Rows[0][0].ToString();


            chart1.Series["Series1"].ChartType   = SeriesChartType.Column;
            chart1.Series["Series1"].BorderWidth = 5;

            chart1.Series["Series1"].LegendText = "연체율";
        }