Esempio n. 1
0
 protected void InsertProdReport(object o)
 {
     try
     {
         ProdRecoder.ProdRecord(System.DateTime.Now);
     }
     catch
     {
         if (ReportTimer != null)
         {
             ReportTimer.Dispose();
             ReportTimer = null;
         }
     }
 }
Esempio n. 2
0
        protected void InsertProdReportAsTime(string datetime)
        {
            MSYS.DAL.DbOperator opt   = new MSYS.DAL.DbOperator();
            DataSet             times = opt.CreateDataSetOra("select date_begin  as time ,team_code from ht_prod_schedule where substr(date_begin,1,10) = '" + datetime + "' union select date_end as time,team_code  from ht_prod_schedule where substr(date_end,1,10) ='" + datetime + "' union select starttime  as time ,''  from ht_prod_report where substr(starttime,1,10) = '" + datetime + "' union select endtime  as time,''  from ht_prod_report where substr(endtime,1,10) = '" + datetime + "'");

            if (times != null && times.Tables[0].Rows.Count > 0)
            {
                try
                {
                    foreach (DataRow time in times.Tables[0].Rows)
                    {
                        ProdRecoder.ProdRecord(time["time"].ToString(), time["team_code"].ToString());
                    }
                }
                catch
                {
                }
            }
        }