Beispiel #1
0
        private void CalculateRatingForm_Load(object sender, EventArgs e)
        {
            cboPlanID.ComboBinding(releaseService.SelectPlanID(), "release_no", "release_no");

            release_no = Convert.ToInt32(cboPlanID.SelectedValue);

            fromToDateControl2.To = fromToDateControl2.From.AddDays(7);
            from = Convert.ToDateTime(fromToDateControl2.From.ToShortDateString());
            to   = Convert.ToDateTime(fromToDateControl2.To.ToShortDateString());

            dt             = releaseService.Calculate_ReleasePlan(release_no, from, to);
            dgv.DataSource = dt;
        }
Beispiel #2
0
        private void OrderPlanForm_Load(object sender, EventArgs e)
        {
            dgv.ColumnHeadersDefaultCellStyle.ForeColor = Color.LightBlue;
            dgv.ColumnHeadersHeight = 30;

            fromToDateControl1.From = DtpFrom;
            fromToDateControl1.To   = DtpTo;

            cboPlanID.ComboBinding(releaseService.SelectPlanID(), "release_no", "release_no");
            cboPlanID.SelectedValue = Release_no;

            release_no = Convert.ToInt32(cboPlanID.SelectedValue);

            DataTable dt = orderService.Calculate_OrderPlan(release_no, DtpFrom, DtpTo);

            dgv.DataSource = dt;

            for (int i = 0; i < dgv.Rows.Count; i += 3)
            {
                dgv.Rows[i].DefaultCellStyle.BackColor = Color.AliceBlue;
                dgv.Rows[i].DefaultCellStyle.ForeColor = Color.Red;
            }
        }