Ejemplo n.º 1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!this.IsPostBack)
     {
         DbAccessHelper database  = new DbAccessHelper("InnoluxDB");
         string         shiftDate = database.ExecuteScalar("SELECT T.SHIFT_DATE FROM SHIFT_DATE T WHERE SYSDATE BETWEEN T.CALSTARTDATE AND T.CALENDDATE").ToString();
         string         year      = shiftDate.Substring(0, 4);
         string         month     = shiftDate.Substring(4, 2);
         string         day       = shiftDate.Substring(6, 2);
         this.EndDatePicker.SelectedDate   = Convert.ToDateTime(year + "-" + month + "-" + day);
         this.StartDatePicker.SelectedDate = Convert.ToDateTime(year + "-" + month + "-1").AddDays(-3);
     }
 }
Ejemplo n.º 2
0
 public override object ExecuteScalar(IDbConnection connection, string cmdText, IList <IDbDataParameter> parameter)
 {
     return(DbAccessHelper.ExecuteScalar((OleDbConnection)connection, CommandType.Text, cmdText, parameter == null ? null : parameter.Cast <OleDbParameter>().ToArray()));
 }