Ejemplo n.º 1
0
        private void monthCalendarAlb1_DaySelected(object sender, VisionInfoSolutionLibrary.MonthCal.DaySelectedEventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            dtKerkimi      = Convert.ToDateTime((e.Days).GetValue(0));
            InputController data = new InputController();

            try
            {
                if ((this.cbHoteli.Checked == true) && (this.cbBarRes.Checked == true))
                {
                    this.error.SetError(this.groupBox2, "");
                }
                else if (this.cbBarRes.Checked == true)
                {
                    this.error.SetError(this.groupBox2, "");
                }
                else if (this.cbHoteli.Checked == true)
                {
                    this.error.SetError(this.groupBox2, "");
                    ds = data.KerkesaRead("GjendjaRealeArke", dtKerkimi);
                    DataRow dr    = ds.Tables[0].Rows[0];
                    int     vlera = Convert.ToInt32(ds.Tables[0].Rows[0]["SHUMA"]);
                    this.numGjendjaReale.Text = Convert.ToString(vlera);
                    this.dgArka.DataSource    = ds.Tables[0];
                    this.KrijoStilGride();
                }
                else
                {
                    this.numGjendjaReale.Text = "";
                    this.dgArka.DataSource    = null;
                    this.error.SetError(this.groupBox2, "Zgjidhni nje prej moduleve!");
                }
            }
            catch (SqlException ex)
            {
                VisionInfoSolutionLibrary.MessageBox.Show(this, ex);
                return;
            }
            catch (Exception ex)
            {
                VisionInfoSolutionLibrary.MessageBox.Show(this, ex);
                return;
            }
            finally
            {
                Cursor.Current = Cursors.Default;
            }
        }
Ejemplo n.º 2
0
 private void monthCalendarAlb1_DaySelected(object sender, VisionInfoSolutionLibrary.MonthCal.DaySelectedEventArgs e)
 {
     try
     {
         dtKerkimi = Convert.ToDateTime((e.Days).GetValue(0));
         string strdata = Convert.ToString(dtKerkimi.ToShortDateString());
         string strora  = Convert.ToDateTime(this.dateTimePicker1.Value).ToShortTimeString().ToString();
         strdata   = strdata + " " + strora;
         dtKerkimi = Convert.ToDateTime(strdata);
         //dtKerkimi = Convert.ToDateTime((e.Days).GetValue(0));
     }
     catch (SqlException ex)
     {
         VisionInfoSolutionLibrary.MessageBox.Show(this, ex);
         return;
     }
     catch (Exception ex)
     {
         VisionInfoSolutionLibrary.MessageBox.Show(this, ex);
     }
 }