예제 #1
0
 private void btnselect_Click(object sender, EventArgs e)
 {
     try
     {
         Lab_Msg.Hide(); label2.Text = "";
         DataTable dt1 = this.cntrl.search(dateTimePickerdailyappointcount1.Value.ToString("yyyy-MM-dd"), dateTimePickerdailyappointcount2.Value.ToString("yyyy-MM-dd"));
         dgvVisitingHistory.AutoGenerateColumns = false;
         dgvVisitingHistory.DataSource          = dt1;
         if (dt1.Rows.Count > 0)
         {
             int count = dt1.Rows.Count;
             label2.Text = count.ToString();
             Lab_Msg.Hide();
         }
         else
         {
             dgvVisitingHistory.DataSource = null;
             label2.Text = "0";
             int x = (panel1.Size.Width - Lab_Msg.Size.Width) / 2;
             Lab_Msg.Location = new Point(x, Lab_Msg.Location.Y);
             Lab_Msg.Show();
         }
         var dateFrom = dateTimePickerdailyappointcount1.Value.ToShortDateString();
         var dateTo   = dateTimePickerdailyappointcount2.Value.ToShortDateString();
         if (Convert.ToDateTime(dateFrom).Date > Convert.ToDateTime(dateTo).Date)
         {
             MessageBox.Show("From date should be less than To date", "From Date is grater ", MessageBoxButtons.OK, MessageBoxIcon.Error);
             dateTimePickerdailyappointcount1.Value = DateTime.Today;
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "Error !...", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
        public void load()
        {
            int slno = 0;

            Lab_Msg.Hide();
            PappyjoeMVC.Model.Connection.MyGlobals.Date_From = dtpFrom.Value.ToString("yyyy-MM-dd");
            PappyjoeMVC.Model.Connection.MyGlobals.Date_To   = dtpTo.Value.ToString("yyyy-MM-dd");
            dgvItemData.Rows.Clear();
            string fromdate = dtpFrom.Value.ToString("yyyy-MM-dd");
            string todate   = dtpTo.Value.ToString("yyyy-MM-dd");

            if (Convert.ToDateTime(fromdate).Date > Convert.ToDateTime(todate).Date)
            {
                MessageBox.Show("From date should be less than To date", "From Date is grater ", MessageBoxButtons.OK, MessageBoxIcon.Error);
                dtpFrom.Value = DateTime.Today;
            }
            else
            {
                DataTable dt = this.cntrl.Purchase(dtpFrom.Value.ToString("yyyy-MM-dd"), dtpTo.Value.ToString("yyyy-MM-dd"));
                if (dt.Rows.Count > 0)
                {
                    for (int i = 0; i < dt.Rows.Count; i++)
                    {
                        slno = i + 1;
                        dgvItemData.Rows.Add(slno, dt.Rows[i]["Pur_order_no"].ToString(), Convert.ToDateTime(dt.Rows[i]["Purch_order_date"].ToString()).ToString("MM/dd/yyyy"), dt.Rows[i]["Supplier_Name"].ToString(), dt.Rows[i]["qty"].ToString(), dt.Rows[i]["amount"].ToString());
                    }
                }
                else
                {
                    int x = (panel3.Size.Width - Lab_Msg.Size.Width) / 2;
                    Lab_Msg.Location = new Point(x, Lab_Msg.Location.Y);
                    Lab_Msg.Show();
                }
            }
        }
예제 #3
0
 private void combodoctors_SelectedIndexChanged(object sender, EventArgs e)
 {
     try
     {
         if (combodoctors.SelectedIndex == -1)
         {
         }
         else
         {
             label4.Text = "";
             foreach (var series in charttreateachdoctor.Series)
             {
                 series.Points.Clear();
             }
             drctid = combodoctors.SelectedItem.ToString();
             string query             = "SELECT id from tbl_doctor where doctor_name='" + drctid + "'";
             string date1             = dateTimePickertreateachdoctor1.Value.ToString("yyyy-MM-dd");
             string date2             = dateTimePickertreateachdoctor2.Value.ToString("yyyy-MM-dd");
             System.Data.DataTable dt = this.cntrl.DocId_frm_DocTbl(drctid);
             if (dt.Rows.Count > 0)
             {
                 Selected_drid = dt.Rows[0][0].ToString();
             }
             if (combodoctors.SelectedIndex > 0)
             {
                 DataTable dt1 = this.cntrl.grdDailytreatmntTble(Convert.ToInt32(Selected_drid.ToString()), date1, date2);
                 gridtreatmentondoctors.AutoGenerateColumns = false;
                 bind_grid(dt1);
                 int count = dt1.Rows.Count;
                 label4.Text = count.ToString();
                 Grvtreatmenteachdoctor.DataSource = this.cntrl.Doctoreachtreatment(date1, date2, Selected_drid.ToString());
             }
             else if (combodoctors.SelectedIndex == 0)
             {
                 DataTable dt1 = this.cntrl.GridDLYTTMNTtb(date1, date2);
                 gridtreatmentondoctors.AutoGenerateColumns = false;
                 bind_grid(dt1);
                 int count = dt1.Rows.Count;
                 label4.Text = count.ToString();
                 Grvtreatmenteachdoctor.DataSource = this.cntrl.DoctoreachtreatmentLoad(date1, date2);
             }
             this.Grvtreatmenteachdoctor.Columns[0].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
             this.Grvtreatmenteachdoctor.Columns[1].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
             if (Grvtreatmenteachdoctor.Rows.Count < 1)
             {
                 int x = (panel4.Size.Width - Lab_Msg.Size.Width) / 2;
                 Lab_Msg.Location = new Point(x, Lab_Msg.Location.Y);
                 Lab_Msg.Show();
             }
             else
             {
                 Lab_Msg.Hide();
             }
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "Error !...", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
예제 #4
0
        public void load(DataTable dt)
        {
            Lab_Msg.Hide();
            int slno = 0;

            if (dt.Rows.Count > 0)
            {
                dgv_Purchase.Rows.Clear();
                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    slno = i + 1;
                    dgv_Purchase.Rows.Add();
                    dgv_Purchase.Rows[i].Cells["colslNo"].Value            = slno.ToString();
                    dgv_Purchase.Rows[i].Cells["colPurNum"].Value          = dt.Rows[i]["PurchNumber"].ToString();
                    dgv_Purchase.Rows[i].Cells["Purchase_Return_No"].Value = dt.Rows[i]["RetNumber"].ToString();
                    dgv_Purchase.Rows[i].Cells["ReturnDate"].Value         = Convert.ToDateTime(dt.Rows[i]["ReturnDate"].ToString()).ToString("MM/dd/yyyy");
                    dgv_Purchase.Rows[i].Cells["SupplierId"].Value         = dt.Rows[i]["Sup_Code"].ToString();
                    dgv_Purchase.Rows[i].Cells["colSupplierName"].Value    = dt.Rows[i]["Supplier_Name"].ToString();
                    dgv_Purchase.Rows[i].Cells["colTotalAmount"].Value     = Convert.ToDecimal(dt.Rows[i]["TotalAmount"].ToString()).ToString("##.00");
                }
            }
            else
            {
                int x = (panel2.Size.Width - Lab_Msg.Size.Width) / 2;
                Lab_Msg.Location = new Point(x, Lab_Msg.Location.Y);
                Lab_Msg.Show();
            }
            dgv_Purchase.ColumnHeadersDefaultCellStyle.Font    = new Font("Sego UI", 9, FontStyle.Regular);
            dgv_Purchase.Columns[6].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight;
        }
예제 #5
0
 private void comboboxcategory_SelectedIndexChanged(object sender, EventArgs e)
 {
     try
     {
         if (comboboxcategory.SelectedIndex == -1)
         {
         }
         else
         {
             label4.Text = "";
             foreach (var series in charttreatmenteachcategory.Series)
             {
                 series.Points.Clear();
             }
             drctid = comboboxcategory.SelectedItem.ToString();
             gridoncategory.DataSource = null;
             string date1             = dateTimePickertreatmenteachcat1.Value.ToString("yyyy-MM-dd");
             string date2             = dateTimePickertreatmenteachcat2.Value.ToString("yyyy-MM-dd");
             System.Data.DataTable dt = this.cntrl.docId(drctid);
             if (dt.Rows.Count > 0)
             {
                 Selected_drid = dt.Rows[0][0].ToString();
             }
             if (comboboxcategory.SelectedIndex == 0)
             {
                 DataTable dt1 = this.cntrl.ProPat(date1, date2);
                 gridoncategory.AutoGenerateColumns = false;
                 bind_grid(dt1);
                 int count = dt1.Rows.Count;
                 label4.Text = count.ToString();
                 Grvtreatmenteachcat.DataSource = this.cntrl.TreatmenteachcatLoad(date1, date2);
             }
             else if (comboboxcategory.SelectedIndex > 0)
             {
                 DataTable dt1 = this.cntrl.Propat2(Convert.ToInt32(Selected_drid.ToString().Trim()), date1, date2);
                 gridoncategory.AutoGenerateColumns = false;
                 bind_grid(dt1);
                 int count = dt1.Rows.Count;
                 label4.Text = count.ToString();
                 Grvtreatmenteachcat.DataSource = this.cntrl.Treatmenteachcat(date1, date2, Selected_drid);
             }
             this.Grvtreatmenteachcat.Columns[0].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
             this.Grvtreatmenteachcat.Columns[1].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
             if (Grvtreatmenteachcat.Rows.Count < 1)
             {
                 int x = (panel4.Size.Width - Lab_Msg.Size.Width) / 2;
                 Lab_Msg.Location = new Point(x, Lab_Msg.Location.Y);
                 Lab_Msg.Show();
             }
             else
             {
                 Lab_Msg.Hide();
             }
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "Error !...", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
        private void btnviewchart_Click(object sender, EventArgs e)
        {
            label2.Visible = true;
            foreach (var series in chartdailytreatment.Series)
            {
                series.Points.Clear();
            }
            fill_grid();
            this.Grvdailytreatment.Columns[0].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
            this.Grvdailytreatment.Columns[1].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
            if (Grvdailytreatment.Rows.Count < 1)
            {
                int x = (panel4.Size.Width - Lab_Msg.Size.Width) / 2;
                Lab_Msg.Location = new Point(x, Lab_Msg.Location.Y);
                Lab_Msg.Show();
            }
            else
            {
                Lab_Msg.Hide();
            }
            griddailyteatment.Hide();
            chartdailytreatment.Show();
            btngrddailytreatment.Visible = true;
            chartdailytreatment.Location = new Point(22, 50);
            chartdailytreatment.Size     = new Size(1306, 378);
            this.Grvdailytreatment.ColumnHeadersDefaultCellStyle.WrapMode = DataGridViewTriState.False;
            dateTimePickerdailytreatment1.MaxDate = DateTime.Now;
            dateTimePickerdailytreatment2.MaxDate = DateTime.Now;
            DateTime now  = DateTime.Now;
            DateTime date = new DateTime(now.Year, now.Month, 1);
            int      row  = griddailyteatment.Rows.Count;

            label2.Text = row.ToString();
        }
예제 #7
0
 private void btn_grid_Click(object sender, EventArgs e)
 {
     try
     {
         string drid = comboBoxdoctor.SelectedItem.ToString();
         string dt   = this.cntrl.get_docId(drid);;
         if (dt != "")
         {
             select_dr_id = dt;
         }
         fillGrid();
         chartappointeachdoctor.Hide();
         if (dataGridVieweachdoctorappoinmt.Rows.Count < 1)
         {
             int x = (panel2.Size.Width - Lab_Msg.Size.Width) / 2;
             Lab_Msg.Location = new Point(x, Lab_Msg.Location.Y);
             Lab_Msg.Show();
         }
         else
         {
             Lab_Msg.Hide();
         }
         dataGridVieweachdoctorappoinmt.Location = new System.Drawing.Point(1, 3);
         dataGridVieweachdoctorappoinmt.Show();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "Error !..", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
 private void comboBoxdoctor_SelectedIndexChanged(object sender, EventArgs e)
 {
     try
     {
         if (comboBoxdoctor.SelectedIndex == -1)
         {
         }
         else
         {
             drctid = comboBoxdoctor.SelectedItem.ToString();
             string dt = this.cntrl.Get_DoctorId(drctid);
             if (dt != "")
             {
                 select_dr_id = dt.ToString();
             }
             fillgrid();
             if (dataGridViewDailyappoinment.Rows.Count < 1)
             {
                 int x = (panel4.Size.Width - Lab_Msg.Size.Width) / 2;
                 Lab_Msg.Location = new Point(x, Lab_Msg.Location.Y);
                 Lab_Msg.Show();
             }
             else
             {
                 Lab_Msg.Hide();
             }
             int row = dataGridViewDailyappoinment.Rows.Count;
             lAB_TOTAL.Text = row.ToString();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "Error !..", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
 private void Daily_appointment_count_Load(object sender, EventArgs e)
 {
     try
     {
         lAB_TOTAL.Visible = false;
         this.Grvdailyappointcount.ColumnHeadersDefaultCellStyle.WrapMode = DataGridViewTriState.False;
         DateTime now = DateTime.Now;
         btnHidedatalist.Show();
         comboBoxdoctor.Items.Add("All Doctor");
         comboBoxdoctor.ValueMember   = "0";
         comboBoxdoctor.DisplayMember = "All Doctor";
         DataTable doctor_rs = this.cntrl.doctor_rs();
         if (doctor_rs.Rows.Count > 0)
         {
             for (int i = 0; i < doctor_rs.Rows.Count; i++)
             {
                 comboBoxdoctor.Items.Add(doctor_rs.Rows[i]["doctor_name"].ToString());
                 comboBoxdoctor.ValueMember   = doctor_rs.Rows[i]["id"].ToString();
                 comboBoxdoctor.DisplayMember = doctor_rs.Rows[i]["doctor_name"].ToString();
             }
         }
         comboBoxdoctor.SelectedIndex = 0;
         dataGridViewDailyappoinment.Hide();
         this.dataGridViewDailyappoinment.RowPostPaint += new DataGridViewRowPostPaintEventHandler(dataGridViewDailyappoinment_RowPostPaint);
         lAB_TOTAL.Visible = true;
         lAB_TOTAL.Text    = 0.ToString();
         fillgrid();
         if (dataGridViewDailyappoinment.Rows.Count < 1)
         {
             Lab_Msg.Show();
             int x = (panel4.Size.Width - Lab_Msg.Size.Width) / 2;
             Lab_Msg.Location = new Point(x, Lab_Msg.Location.Y);
         }
         else
         {
             Lab_Msg.Hide();
         }
         Grvdailyappointcount.ColumnHeadersDefaultCellStyle.BackColor = Color.DimGray;
         Grvdailyappointcount.ColumnHeadersDefaultCellStyle.ForeColor = Color.White;
         Grvdailyappointcount.ColumnHeadersDefaultCellStyle.Font      = new System.Drawing.Font("Sego UI", 8, FontStyle.Regular);
         Grvdailyappointcount.EnableHeadersVisualStyles = false;
         Grvdailyappointcount.Location = new System.Drawing.Point(5, 5);
         foreach (DataGridViewColumn cl in Grvdailyappointcount.Columns)
         {
             cl.SortMode = DataGridViewColumnSortMode.NotSortable;
         }
         dataGridViewDailyappoinment.ColumnHeadersDefaultCellStyle.BackColor = Color.DimGray;
         dataGridViewDailyappoinment.ColumnHeadersDefaultCellStyle.ForeColor = Color.White;
         dataGridViewDailyappoinment.ColumnHeadersDefaultCellStyle.Font      = new System.Drawing.Font("Sego UI", 9, FontStyle.Regular);
         dataGridViewDailyappoinment.EnableHeadersVisualStyles = false;
         foreach (DataGridViewColumn cl in dataGridViewDailyappoinment.Columns)
         {
             cl.SortMode = DataGridViewColumnSortMode.NotSortable;
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "Error !..", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
 private void serchdaily_Click(object sender, EventArgs e)
 {
     lAB_TOTAL.Visible = true;
     lAB_TOTAL.Text    = 0.ToString();
     fillgrid();
     if (dataGridViewDailyappoinment.Visible)
     {
         int row = dataGridViewDailyappoinment.Rows.Count;
         lAB_TOTAL.Text = row.ToString();
         if (dataGridViewDailyappoinment.Rows.Count < 1)
         {
             Lab_Msg.Show();
             int x = (panel4.Size.Width - Lab_Msg.Size.Width) / 2;
             Lab_Msg.Location = new Point(x, Lab_Msg.Location.Y);
         }
         else
         {
             Lab_Msg.Hide();
         }
     }
     else
     {
         chartdailyappointcount.Show();
         if (Grvdailyappointcount.Rows.Count < 1)
         {
             Lab_Msg.Show();
             int x = (panel4.Size.Width - Lab_Msg.Size.Width) / 2;
             Lab_Msg.Location = new Point(x, Lab_Msg.Location.Y);
         }
         else
         {
             Lab_Msg.Hide();
         }
     }
 }
예제 #11
0
        private void btnviewchart_Click(object sender, EventArgs e)
        {
            Lab_Total.Visible = true;
            fill_grid();
            if (Dgv_ChartExpanse.Rows.Count < 1)
            {
                int x = (panel3.Size.Width - Lab_Msg.Size.Width) / 2;
                Lab_Msg.Location = new Point(x, Lab_Msg.Location.Y);
                Lab_Msg.Show();
            }
            else
            {
                Lab_Msg.Hide();
            }
            Dgv_Expanse.Hide();
            chart_EXpanse.Show();
            btngrddailytreatment.Visible = true;
            chart_EXpanse.Location       = new Point(22, 50);
            chart_EXpanse.Size           = new Size(1306, 378);
            this.Dgv_ChartExpanse.ColumnHeadersDefaultCellStyle.WrapMode = DataGridViewTriState.False;
            dateTimePickerdailytreatment1.MaxDate = DateTime.Now;
            dateTimePickerdailytreatment2.MaxDate = DateTime.Now;
            DateTime now  = DateTime.Now;
            DateTime date = new DateTime(now.Year, now.Month, 1);
            int      row  = Dgv_Expanse.Rows.Count;

            Lab_Total.Text = row.ToString();
        }
예제 #12
0
 private void DoctorWise_appointment_report_Load(object sender, EventArgs e)
 {
     try
     {
         label_empty.Hide();
         this.Grvappointforeachdoctor.ColumnHeadersDefaultCellStyle.WrapMode = DataGridViewTriState.False;
         comboBoxdoctor.Items.Add("All Doctor");
         comboBoxdoctor.ValueMember   = "0";
         comboBoxdoctor.DisplayMember = "All Doctor";
         DataTable doctor_rs = this.cntrl.get_all_doctorname();
         if (doctor_rs.Rows.Count > 0)
         {
             for (int i = 0; i < doctor_rs.Rows.Count; i++)
             {
                 comboBoxdoctor.Items.Add(doctor_rs.Rows[i]["doctor_name"].ToString());
                 comboBoxdoctor.ValueMember   = doctor_rs.Rows[i]["id"].ToString();
                 comboBoxdoctor.DisplayMember = doctor_rs.Rows[i]["doctor_name"].ToString();
             }
         }
         comboBoxdoctor.SelectedIndex = 0;
         select_dr_id = "0";
         dataGridVieweachdoctorappoinmt.Hide();
         this.dataGridVieweachdoctorappoinmt.RowPostPaint += new DataGridViewRowPostPaintEventHandler(dataGridVieweachdoctorappoinmt_RowPostPaint);
         this.chartappointeachdoctor.Titles.Add(" Appointment for each Doctor");
         DateTime now  = DateTime.Now;
         DateTime date = new DateTime(now.Year, now.Month, 1);
         dateTimePickerappointeachdoctor1.Value = date;
         fillGrid();
         Grvappointforeachdoctor.ColumnHeadersDefaultCellStyle.BackColor = Color.DimGray;
         Grvappointforeachdoctor.ColumnHeadersDefaultCellStyle.ForeColor = Color.White;
         Grvappointforeachdoctor.ColumnHeadersDefaultCellStyle.Font      = new System.Drawing.Font("Sego UI", 8, FontStyle.Regular);
         Grvappointforeachdoctor.EnableHeadersVisualStyles = false;
         foreach (DataGridViewColumn cl in Grvappointforeachdoctor.Columns)
         {
             cl.SortMode = DataGridViewColumnSortMode.NotSortable;
         }
         dataGridVieweachdoctorappoinmt.ColumnHeadersDefaultCellStyle.BackColor = Color.DimGray;
         dataGridVieweachdoctorappoinmt.ColumnHeadersDefaultCellStyle.ForeColor = Color.White;
         dataGridVieweachdoctorappoinmt.ColumnHeadersDefaultCellStyle.Font      = new System.Drawing.Font("Sego UI", 8, FontStyle.Regular);
         dataGridVieweachdoctorappoinmt.EnableHeadersVisualStyles = false;
         foreach (DataGridViewColumn cl in dataGridVieweachdoctorappoinmt.Columns)
         {
             cl.SortMode = DataGridViewColumnSortMode.NotSortable;
         }
         if (Grvappointforeachdoctor.Rows.Count < 1)
         {
             int x = (panel2.Size.Width - Lab_Msg.Size.Width) / 2;
             Lab_Msg.Location = new Point(x, Lab_Msg.Location.Y);
             Lab_Msg.Show();
         }
         else
         {
             Lab_Msg.Hide();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "Error !..", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
예제 #13
0
 private void btn_Search_Click(object sender, EventArgs e)
 {
     fillGrid();
     if (dataGridVieweachdoctorappoinmt.Visible)
     {
         chartappointeachdoctor.Hide();
         dataGridVieweachdoctorappoinmt.Show();
         if (dataGridVieweachdoctorappoinmt.Rows.Count < 1)
         {
             int x = (panel2.Size.Width - Lab_Msg.Size.Width) / 2;
             Lab_Msg.Location = new Point(x, Lab_Msg.Location.Y);
             Lab_Msg.Show();
         }
         else
         {
             Lab_Msg.Hide();
         }
     }
     else
     {
         dataGridVieweachdoctorappoinmt.Hide();
         chartappointeachdoctor.Show();
         if (Grvappointforeachdoctor.Rows.Count < 1)
         {
             int x = (panel2.Size.Width - Lab_Msg.Size.Width) / 2;
             Lab_Msg.Location = new Point(x, Lab_Msg.Location.Y);
             Lab_Msg.Show();
         }
         else
         {
             Lab_Msg.Hide();
         }
     }
     dataGridVieweachdoctorappoinmt.Location = new System.Drawing.Point(5, 5);
 }
 private void Cmb_Doctor_SelectedIndexChanged(object sender, EventArgs e)
 {
     try
     {
         select_dr_id = "0";
         if (Cmb_Doctor.SelectedIndex == -1)
         {
         }
         else
         {
             drctid = Cmb_Doctor.SelectedItem.ToString();
             string dt = this.cntrl.Docname_logDocAdmin(drctid);
             if (dt != "")
             {
                 select_dr_id = dt;
             }
             Fillgrid();
             if (Grvmonthlyappointcount.Rows.Count < 1)
             {
                 Lab_Msg.Show();
             }
             else
             {
                 Lab_Msg.Hide();
             }
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "Error !..", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
예제 #15
0
        private void btnselect_Click(object sender, EventArgs e)
        {
            var d1 = dateTimePickerdailytreatment1.Value.ToShortDateString();
            var d2 = dateTimePickerdailytreatment2.Value.ToShortDateString();

            if (Convert.ToDateTime(d1).Date > Convert.ToDateTime(d2).Date)
            {
                MessageBox.Show("From date should be less than to date", "From Date is grater ", MessageBoxButtons.OK, MessageBoxIcon.Information);
                dateTimePickerdailytreatment1.Value = DateTime.Today;
                return;
            }
            fill_grid();
            if (Dgv_Expanse.Visible)
            {
                if (Dgv_ChartExpanse.Rows.Count < 1)
                {
                    int x = (panel3.Size.Width - Lab_Msg.Size.Width) / 2;
                    Lab_Msg.Location = new Point(x, Lab_Msg.Location.Y);
                    Lab_Msg.Show();
                }
                else
                {
                    Lab_Msg.Hide();
                }

                int row = Dgv_Expanse.Rows.Count;
                Lab_Total.Text = row.ToString();
                Dgv_Expanse.Show();
                chart_EXpanse.Hide();
                btngrddailytreatment.Visible = true;
                chart_EXpanse.Location       = new Point(22, 50);
                chart_EXpanse.Size           = new Size(1306, 378);
            }
            else
            {
                Dgv_Expanse.Hide();
                chart_EXpanse.Show();
                btngrddailytreatment.Visible = true;
                chart_EXpanse.Location       = new Point(22, 50);
                chart_EXpanse.Size           = new Size(1306, 378);
                this.Dgv_ChartExpanse.ColumnHeadersDefaultCellStyle.WrapMode = DataGridViewTriState.False;
                dateTimePickerdailytreatment1.MaxDate = DateTime.Now;
                dateTimePickerdailytreatment2.MaxDate = DateTime.Now;
                DateTime now  = DateTime.Now;
                DateTime date = new DateTime(now.Year, now.Month, 1);
                int      row  = Dgv_Expanse.Rows.Count;
                Lab_Total.Text = row.ToString();
                if (Dgv_ChartExpanse.Rows.Count < 1)
                {
                    int x = (panel3.Size.Width - Lab_Msg.Size.Width) / 2;
                    Lab_Msg.Location = new Point(x, Lab_Msg.Location.Y);
                    Lab_Msg.Show();
                }
                else
                {
                    Lab_Msg.Hide();
                }
            }
        }
예제 #16
0
 private void btnviewchart_Click(object sender, EventArgs e)
 {
     try
     {
         gridtreatmentondoctors.Hide();
         charttreateachdoctor.Show();
         charttreateachdoctor.Location = new Point(6, 50);
         charttreateachdoctor.Size     = new Size(1346, 338);
         combodoctors.Show();
         select_dr_id   = "";
         label4.Text    = 0.ToString();
         label4.Visible = true;
         foreach (var series in charttreateachdoctor.Series)
         {
             series.Points.Clear();
         }
         if (combodoctors.SelectedIndex == -1)
         {
         }
         else
         {
             string drid = combodoctors.SelectedItem.ToString();
             System.Data.DataTable dt = this.cntrl.Dr_ID_logn(drid);
             if (dt.Rows.Count > 0)
             {
                 select_dr_id = dt.Rows[0]["Id"].ToString();
             }
         }
         string date1 = dateTimePickertreateachdoctor1.Value.ToString("yyyy-MM-dd");
         string date2 = dateTimePickertreateachdoctor2.Value.ToString("yyyy-MM-dd");
         if (combodoctors.SelectedIndex > 0)
         {
             Grvtreatmenteachdoctor.DataSource = this.cntrl.Doctoreachtreatment(date1, date2, select_dr_id);
         }
         else if (combodoctors.SelectedIndex == 0)
         {
             Grvtreatmenteachdoctor.DataSource = this.cntrl.DoctoreachtreatmentLoad(date1, date2);
         }
         this.Grvtreatmenteachdoctor.Columns[0].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
         this.Grvtreatmenteachdoctor.Columns[1].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
         if (Grvtreatmenteachdoctor.Rows.Count < 1)
         {
             int x = (panel4.Size.Width - Lab_Msg.Size.Width) / 2;
             Lab_Msg.Location = new Point(x, Lab_Msg.Location.Y);
             Lab_Msg.Show();
         }
         else
         {
             Lab_Msg.Hide();
         }
         int count = gridtreatmentondoctors.Rows.Count;
         label4.Text = count.ToString();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "Error !...", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
 private void btngrddailytreatment_Click(object sender, EventArgs e)
 {
     try
     {
         var    d1    = dateTimePickermontreatment1.Value.ToShortDateString();
         var    d2    = dateTimePickermontreatment2.Value.ToShortDateString();
         string date1 = dateTimePickermontreatment1.Value.ToString("yyyy-MM-dd");
         string date2 = dateTimePickermontreatment2.Value.ToString("yyyy-MM-dd");
         if (Convert.ToDateTime(d1).Date > Convert.ToDateTime(d2).Date)
         {
             MessageBox.Show("From date should be less than To date", "From Date is Grater", MessageBoxButtons.OK, MessageBoxIcon.Error);
             dateTimePickermontreatment1.Value = DateTime.Today;
         }
         gridmonthlytreatment.Show();
         chartmonthtreatment.Hide();
         //gridmonthlytreatment.Location = new Point(53, 53);
         // gridmonthlytreatment.Size = new Size(1267, 336);
         label4.Text    = 0.ToString();
         label4.Visible = true;
         foreach (var series in chartmonthtreatment.Series)
         {
             series.Points.Clear();
         }
         if (comboBoxdoctor.SelectedIndex == 0)
         {
             System.Data.DataTable griddailytrreatmenttable = this.cntrl.GridDLYTTMNTtb(date1, date2);
             bind_grid(griddailytrreatmenttable);
             Grvmonthtreatment.DataSource = this.cntrl.MonthtreatmentcountLoad(date1, date2);
         }
         else
         {
             System.Data.DataTable griddailytrreatmenttable = this.cntrl.DailyTablE(date1, date2, select_dr_id);
             bind_grid(griddailytrreatmenttable);
             Grvmonthtreatment.DataSource = this.cntrl.Monthtreatmentcount(date1, date2, select_dr_id);
         }
         this.Grvmonthtreatment.Columns[0].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
         this.Grvmonthtreatment.Columns[1].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
         if (Grvmonthtreatment.Rows.Count == 0)
         {
             int x = (panel4.Size.Width - Lab_Msg.Size.Width) / 2;
             Lab_Msg.Location = new Point(x, Lab_Msg.Location.Y);
             Lab_Msg.Show();
         }
         else
         {
             Lab_Msg.Hide();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "Error !...", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
 private void comboBoxdoctor_SelectedIndexChanged(object sender, EventArgs e)
 {
     try
     {
         select_dr_id = "0";
         foreach (var series in chartmonthtreatment.Series)
         {
             series.Points.Clear();
         }
         string date1 = dateTimePickermontreatment1.Value.ToString("yyyy-MM-dd");
         string date2 = dateTimePickermontreatment2.Value.ToString("yyyy-MM-dd");
         if (comboBoxdoctor.SelectedIndex == -1)
         {
         }
         else
         {
             drctid = comboBoxdoctor.SelectedItem.ToString();
             System.Data.DataTable dt = this.cntrl.DocId_frm_DocTbl(drctid);
             if (dt.Rows.Count > 0)
             {
                 select_dr_id = dt.Rows[0]["Id"].ToString();
             }
             if (comboBoxdoctor.SelectedIndex == 0)
             {
                 System.Data.DataTable datatableeachdoctorappoinment = this.cntrl.ProPat(date1, date2);
                 bind_grid(datatableeachdoctorappoinment);
                 Grvmonthtreatment.DataSource = this.cntrl.MonthtreatmentcountLoad(date1, date2);
             }
             else
             {
                 System.Data.DataTable datatableeachdoctorappoinment = this.cntrl.DailyTablE(date1, date2, select_dr_id);
                 bind_grid(datatableeachdoctorappoinment);
                 Grvmonthtreatment.DataSource = this.cntrl.Monthtreatmentcount(date1, date2, select_dr_id);
             }
             this.Grvmonthtreatment.Columns[0].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
             this.Grvmonthtreatment.Columns[1].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
             if (Grvmonthtreatment.Rows.Count == 0)
             {
                 int x = (panel4.Size.Width - Lab_Msg.Size.Width) / 2;
                 Lab_Msg.Location = new Point(x, Lab_Msg.Location.Y);
                 Lab_Msg.Show();
             }
             else
             {
                 Lab_Msg.Hide();
             }
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "Error !...", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
 private void btnchartview_Click(object sender, EventArgs e)
 {
     btnDataview.Show();
     chartmonthlyappointcount.Visible = true;
     dataGridViewmonthlyappoinment.Hide();
     if (Grvmonthlyappointcount.Rows.Count < 1)
     {
         Lab_Msg.Show();
     }
     else
     {
         Lab_Msg.Hide();
     }
 }
예제 #20
0
        private void Cmb_AccountName_SelectedIndexChanged(object sender, EventArgs e)
        {
            string AccountName = "";

            Lab_Msg.Hide();
            foreach (var series in chart_EXpanse.Series)
            {
                series.Points.Clear();
            }
            if (comboflag == false)
            {
                if (Cmb_AccountName.SelectedIndex == -1)
                {
                }
                else
                {
                    AccountName = Cmb_AccountName.SelectedItem.ToString();
                }
                fill_grid();
                GridStyle();
                if (Dgv_ChartExpanse.Rows.Count < 1)
                {
                    int x = (panel3.Size.Width - Lab_Msg.Size.Width) / 2;
                    Lab_Msg.Location = new Point(x, Lab_Msg.Location.Y);
                    Lab_Msg.Show();
                }
                else
                {
                    Lab_Msg.Hide();
                }
                if (rad_Expanse.Checked)
                {
                    Dgv_Expanse.Columns["Amountincom"].Visible = false;
                    Dgv_Expanse.Columns["Amount"].Visible      = true;
                }
                else if (rad_Income.Checked)
                {
                    Dgv_Expanse.Columns["Amount"].Visible      = false;
                    Dgv_Expanse.Columns["Amountincom"].Visible = true;
                }
                else
                {
                    Dgv_Expanse.Columns["Amount"].Visible      = true;
                    Dgv_Expanse.Columns["Amountincom"].Visible = true;
                }
                int count = Dgv_Expanse.Rows.Count;
                label2.Text = count.ToString();
            }
        }
 private void btnselect_Click(object sender, EventArgs e)
 {
     try
     {
         if (cmbCondition.Text == "Checked Out")
         {
             DataTable dt1 = this.cntrl.btn_shwClick(dateTimePickerdailyappointcount1.Value.ToString("yyyy-MM-dd"), dateTimePickerdailyappointcount2.Value.ToString("yyyy-MM-dd"), cmbCondition.Text);
             dgvMissingCheckout.AutoGenerateColumns = false;
             dgvMissingCheckout.DataSource          = dt1;
             if (dt1.Rows.Count > 0)
             {
                 int count = dt1.Rows.Count;
                 label2.Text = count.ToString();
                 Lab_Msg.Hide();
             }
             else
             {
                 label2.Text = "0";
                 int x = (panel3.Size.Width - Lab_Msg.Size.Width) / 2;
                 Lab_Msg.Location = new Point(x, Lab_Msg.Location.Y);
                 Lab_Msg.Show();
             }
         }
         else
         {
             DataTable dt1 = this.cntrl.showMissing(dateTimePickerdailyappointcount1.Value.ToString("yyyy-MM-dd"), dateTimePickerdailyappointcount2.Value.ToString("yyyy-MM-dd"));                  dgvMissingCheckout.AutoGenerateColumns = false;
             dgvMissingCheckout.DataSource = dt1;
             if (dt1.Rows.Count > 0)
             {
                 int count = dt1.Rows.Count;
                 label2.Text = count.ToString();
                 Lab_Msg.Hide();
             }
             else
             {
                 label2.Text = "0";
                 int x = (panel3.Size.Width - Lab_Msg.Size.Width) / 2;
                 Lab_Msg.Location = new Point(x, Lab_Msg.Location.Y);
                 Lab_Msg.Show();
             }
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "Error !..", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
예제 #22
0
        private void Cmb_AccountName_SelectedIndexChanged(object sender, EventArgs e)
        {
            fill_grid();
            if (Dgv_ChartExpanse.Rows.Count < 1)
            {
                int x = (panel3.Size.Width - Lab_Msg.Size.Width) / 2;
                Lab_Msg.Location = new Point(x, Lab_Msg.Location.Y);
                Lab_Msg.Show();
            }
            else
            {
                Lab_Msg.Hide();
            }
            int count = Dgv_Expanse.Rows.Count;

            Lab_Total.Text = count.ToString();
        }
 private void btnDataview_Click(object sender, EventArgs e)
 {
     Lab_total.Visible = true;
     Lab_total.Text    = 0.ToString();
     total             = 0;
     Fillgrid();
     dataGridViewmonthlyappoinment.Show();
     btnchartview.Show();
     if (dataGridViewmonthlyappoinment.Rows.Count < 1)
     {
         Lab_Msg.Show();
     }
     else
     {
         Lab_Msg.Hide();
     }
 }
 private void comboBoxdoctor_SelectedIndexChanged(object sender, EventArgs e)
 {
     try
     {
         if (comboBoxdoctor.SelectedIndex == -1)
         {
         }
         else
         {
             foreach (var series in chartdailytreatment.Series)
             {
                 series.Points.Clear();
             }
             drctid = comboBoxdoctor.SelectedItem.ToString();
             Lab_Msg.Hide();
             string dt = this.cntrl.Get_DoctorId(drctid);
             if (dt != "")
             {
                 Selected_drid = dt.ToString();
             }
             if (combo_flag == false)
             {
                 label2.Text = "";
                 fill_grid();
                 GridStyle();
                 this.Grvdailytreatment.Columns[0].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
                 this.Grvdailytreatment.Columns[1].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
                 if (Grvdailytreatment.Rows.Count < 1)
                 {
                     int x = (panel4.Size.Width - Lab_Msg.Size.Width) / 2;
                     Lab_Msg.Location = new Point(x, Lab_Msg.Location.Y);
                     Lab_Msg.Show();
                 }
                 else
                 {
                     Lab_Msg.Hide();
                 }
             }
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "Error !...", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
예제 #25
0
 private void btnviewchart_Click(object sender, EventArgs e)
 {
     try
     {
         charttreatmenteachcategory.Show();
         gridoncategory.Hide();
         charttreatmenteachcategory.Location = new Point(45, 51);
         charttreatmenteachcategory.Size     = new Size(1312, 308);
         label4.Text    = 0.ToString();
         label4.Visible = true;
         foreach (var series in charttreatmenteachcategory.Series)
         {
             series.Points.Clear();
         }
         string date1 = dateTimePickertreatmenteachcat1.Value.ToString("yyyy-MM-dd");
         string date2 = dateTimePickertreatmenteachcat2.Value.ToString("yyyy-MM-dd");
         if (comboboxcategory.SelectedIndex == 0)
         {
             Grvtreatmenteachcat.DataSource = this.cntrl.TreatmenteachcatLoad(date1, date2);
         }
         else if (comboboxcategory.SelectedIndex > 0)
         {
             Grvtreatmenteachcat.DataSource = this.cntrl.Treatmenteachcat(date1, date2, Selected_drid);
         }
         this.Grvtreatmenteachcat.Columns[0].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
         this.Grvtreatmenteachcat.Columns[1].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
         if (Grvtreatmenteachcat.Rows.Count < 1)
         {
             int x = (panel4.Size.Width - Lab_Msg.Size.Width) / 2;
             Lab_Msg.Location = new Point(x, Lab_Msg.Location.Y);
             Lab_Msg.Show();
         }
         else
         {
             Lab_Msg.Hide();
         }
         int count = gridoncategory.Rows.Count;
         label4.Text = count.ToString();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "Error !...", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
        private void Cmb_AccountName_SelectedIndexChanged(object sender, EventArgs e)
        {
            string AccountName = "";

            if (comboFlag == false)
            {
                if (Cmb_AccountName.SelectedIndex == -1)
                {
                }
                else
                {
                    AccountName = Cmb_AccountName.SelectedItem.ToString();
                }
                fill_grid();
                if (Dgv_ChartExpanse.Rows.Count < 1)
                {
                    int x = (panel3.Size.Width - Lab_Msg.Size.Width) / 2;
                    Lab_Msg.Location = new Point(x, Lab_Msg.Location.Y);
                    Lab_Msg.Show();
                }
                else
                {
                    Lab_Msg.Hide();
                }
                if (rad_Expanse.Checked)
                {
                    Dgv_Expense.Columns["colAmountdr"].Visible = false;
                    Dgv_Expense.Columns["CoAmountCr"].Visible  = true;
                }
                else if (rad_Income.Checked)
                {
                    Dgv_Expense.Columns["CoAmountCr"].Visible  = false;
                    Dgv_Expense.Columns["colAmountdr"].Visible = true;
                }
                else
                {
                    Dgv_Expense.Columns["CoAmountCr"].Visible  = true;
                    Dgv_Expense.Columns["colAmountdr"].Visible = true;
                }
                int count = Dgv_Expense.Rows.Count;
                label2.Text = count.ToString();
            }
        }
예제 #27
0
        private void btngrddailytreatment_Click(object sender, EventArgs e)
        {
            Dgv_Expanse.Show();
            chart_EXpanse.Hide();
            Dgv_Expanse.Location = new Point(45, 51);
            Dgv_Expanse.Size     = new Size(1312, 308);
            label2.Text          = 0.ToString();
            label2.Visible       = true;
            foreach (var series in chart_EXpanse.Series)
            {
                series.Points.Clear();
            }
            fill_grid();
            if (Dgv_ChartExpanse.Rows.Count < 1)
            {
                int x = (panel3.Size.Width - Lab_Msg.Size.Width) / 2;
                Lab_Msg.Location = new Point(x, Lab_Msg.Location.Y);
                Lab_Msg.Show();
            }
            else
            {
                Lab_Msg.Hide();
            }
            if (rad_Expanse.Checked)
            {
                Dgv_Expanse.Columns["Amountincom"].Visible = false;
                Dgv_Expanse.Columns["Amount"].Visible      = true;
            }
            else if (rad_Income.Checked)
            {
                Dgv_Expanse.Columns["Amount"].Visible      = false;
                Dgv_Expanse.Columns["Amountincom"].Visible = true;
            }
            else
            {
                Dgv_Expanse.Columns["Amount"].Visible      = true;
                Dgv_Expanse.Columns["Amountincom"].Visible = true;
            }
            int count = Dgv_Expanse.Rows.Count;

            label2.Text = count.ToString();
        }
        private void btnViewdatalist_Click(object sender, EventArgs e)
        {
            btnHidedatalist.Show();
            dataGridViewDailyappoinment.Show();
            fillgrid();
            lAB_TOTAL.Visible = true;
            if (dataGridViewDailyappoinment.Rows.Count < 1)
            {
                int x = (panel4.Size.Width - Lab_Msg.Size.Width) / 2;
                Lab_Msg.Location = new Point(x, Lab_Msg.Location.Y);
                Lab_Msg.Show();
            }
            else
            {
                Lab_Msg.Hide();
            }
            int row = dataGridViewDailyappoinment.Rows.Count;

            lAB_TOTAL.Text = row.ToString();
        }
        private void btngrddailytreatment_Click(object sender, EventArgs e)
        {
            var d1 = dateTimePickerdailytreatment1.Value.ToShortDateString();
            var d2 = dateTimePickerdailytreatment2.Value.ToShortDateString();

            if (Convert.ToDateTime(d1).Date > Convert.ToDateTime(d2).Date)
            {
                MessageBox.Show("From date should be less than two date");
                dateTimePickerdailytreatment1.Value = DateTime.Today;
                return;
            }
            Lab_Msg.Hide();
            combo_flag = true;
            foreach (var series in chartdailytreatment.Series)
            {
                series.Points.Clear();
            }
            fill_grid();
            this.Grvdailytreatment.Columns[0].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
            this.Grvdailytreatment.Columns[1].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
            GridStyle();
            int row = griddailyteatment.Rows.Count;

            label2.Text = row.ToString();
            griddailyteatment.Show();
            chartdailytreatment.Hide();
            btngrddailytreatment.Visible = true;
            chartdailytreatment.Location = new Point(22, 50);
            chartdailytreatment.Size     = new Size(1306, 378);
            if (Grvdailytreatment.Rows.Count < 1)
            {
                int x = (panel4.Size.Width - Lab_Msg.Size.Width) / 2;
                Lab_Msg.Location = new Point(x, Lab_Msg.Location.Y);
                Lab_Msg.Show();
            }
            else
            {
                Lab_Msg.Hide();
            }
            combo_flag = false;
        }
예제 #30
0
        private void btngrddailytreatment_Click(object sender, EventArgs e)
        {
            Dgv_Expanse.Show();
            chart_EXpanse.Hide();
            Dgv_Expanse.Location = new Point(45, 51);
            Dgv_Expanse.Size     = new Size(1312, 308);
            fill_grid();
            if (Dgv_ChartExpanse.Rows.Count < 1)
            {
                int x = (panel3.Size.Width - Lab_Msg.Size.Width) / 2;
                Lab_Msg.Location = new Point(x, Lab_Msg.Location.Y);
                Lab_Msg.Show();
            }
            else
            {
                Lab_Msg.Hide();
            }
            int count = Dgv_Expanse.Rows.Count;

            Lab_Total.Text = count.ToString();
        }