예제 #1
0
        public Tuple <DateTime, DateTime, DateTime, DateTime> GetWorkAmPmTime(DateTime date)
        {
            Tuple <DateTime, DateTime, DateTime, DateTime> result        = null;
            List <RoadFlow.Data.Model.WorkTime>            yearFromCache = GetYearFromCache(date.Year);

            RoadFlow.Data.Model.WorkTime workTime = null;
            foreach (RoadFlow.Data.Model.WorkTime item5 in yearFromCache)
            {
                if (date >= item5.Date1 && date <= item5.Date2)
                {
                    workTime = item5;
                    break;
                }
            }
            if (workTime == null)
            {
                return(result);
            }
            DateTime item  = (date.ToDateString() + " " + workTime.AmTime1).ToDateTime();
            DateTime item2 = (date.ToDateString() + " " + workTime.AmTime2).ToDateTime();
            DateTime item3 = (date.ToDateString() + " " + workTime.PmTime1).ToDateTime();
            DateTime item4 = (date.ToDateString() + " " + workTime.PmTime2).ToDateTime();

            return(new Tuple <DateTime, DateTime, DateTime, DateTime>(item, item2, item3, item4));
        }
예제 #2
0
        private List <RoadFlow.Data.Model.WorkTime> DataReaderToList(OracleDataReader dataReader)
        {
            List <RoadFlow.Data.Model.WorkTime> list = new List <RoadFlow.Data.Model.WorkTime>();

            RoadFlow.Data.Model.WorkTime workTime = null;
            while (((DbDataReader)dataReader).Read())
            {
                workTime         = new RoadFlow.Data.Model.WorkTime();
                workTime.ID      = ((DbDataReader)dataReader).GetGuid(0);
                workTime.Year    = ((DbDataReader)dataReader).GetInt32(1);
                workTime.Date1   = ((DbDataReader)dataReader).GetDateTime(2);
                workTime.Date2   = ((DbDataReader)dataReader).GetDateTime(3);
                workTime.AmTime1 = ((DbDataReader)dataReader).GetString(4);
                workTime.AmTime2 = ((DbDataReader)dataReader).GetString(5);
                workTime.PmTime1 = ((DbDataReader)dataReader).GetString(6);
                workTime.PmTime2 = ((DbDataReader)dataReader).GetString(7);
                list.Add(workTime);
            }
            return(list);
        }
예제 #3
0
        public int Update(RoadFlow.Data.Model.WorkTime model)
        {
            string sql = "UPDATE WorkTime SET \r\n\t\t\t\tYear=@Year,Date1=@Date1,Date2=@Date2,AmTime1=@AmTime1,AmTime2=@AmTime2,PmTime1=@PmTime1,PmTime2=@PmTime2\r\n\t\t\t\tWHERE ID=@ID";

            SqlParameter[] parameter = new SqlParameter[8]
            {
                new SqlParameter("@Year", SqlDbType.Int, -1)
                {
                    Value = model.Year
                },
                new SqlParameter("@Date1", SqlDbType.DateTime, 8)
                {
                    Value = model.Date1
                },
                new SqlParameter("@Date2", SqlDbType.DateTime, 8)
                {
                    Value = model.Date2
                },
                new SqlParameter("@AmTime1", SqlDbType.VarChar, 50)
                {
                    Value = model.AmTime1
                },
                new SqlParameter("@AmTime2", SqlDbType.VarChar, 50)
                {
                    Value = model.AmTime2
                },
                new SqlParameter("@PmTime1", SqlDbType.VarChar, 50)
                {
                    Value = model.PmTime1
                },
                new SqlParameter("@PmTime2", SqlDbType.VarChar, 50)
                {
                    Value = model.PmTime2
                },
                new SqlParameter("@ID", SqlDbType.UniqueIdentifier, -1)
                {
                    Value = model.ID
                }
            };
            return(dbHelper.Execute(sql, parameter));
        }
예제 #4
0
        public int Add(RoadFlow.Data.Model.WorkTime model)
        {
            string sql = "INSERT INTO WorkTime\r\n\t\t\t\t(ID,Year,Date1,Date2,AmTime1,AmTime2,PmTime1,PmTime2) \r\n\t\t\t\tVALUES(@ID,@Year,@Date1,@Date2,@AmTime1,@AmTime2,@PmTime1,@PmTime2)";

            SqlParameter[] parameter = new SqlParameter[8]
            {
                new SqlParameter("@ID", SqlDbType.UniqueIdentifier, -1)
                {
                    Value = model.ID
                },
                new SqlParameter("@Year", SqlDbType.Int, -1)
                {
                    Value = model.Year
                },
                new SqlParameter("@Date1", SqlDbType.DateTime, 8)
                {
                    Value = model.Date1
                },
                new SqlParameter("@Date2", SqlDbType.DateTime, 8)
                {
                    Value = model.Date2
                },
                new SqlParameter("@AmTime1", SqlDbType.VarChar, 50)
                {
                    Value = model.AmTime1
                },
                new SqlParameter("@AmTime2", SqlDbType.VarChar, 50)
                {
                    Value = model.AmTime2
                },
                new SqlParameter("@PmTime1", SqlDbType.VarChar, 50)
                {
                    Value = model.PmTime1
                },
                new SqlParameter("@PmTime2", SqlDbType.VarChar, 50)
                {
                    Value = model.PmTime2
                }
            };
            return(dbHelper.Execute(sql, parameter));
        }
예제 #5
0
        public int Update(RoadFlow.Data.Model.WorkTime model)
        {
            //IL_0017: Unknown result type (might be due to invalid IL or missing references)
            //IL_001c: Unknown result type (might be due to invalid IL or missing references)
            //IL_002d: Expected O, but got Unknown
            //IL_002e: Expected O, but got Unknown
            //IL_0037: Unknown result type (might be due to invalid IL or missing references)
            //IL_003c: Unknown result type (might be due to invalid IL or missing references)
            //IL_004d: Expected O, but got Unknown
            //IL_004e: Expected O, but got Unknown
            //IL_0057: Unknown result type (might be due to invalid IL or missing references)
            //IL_005c: Unknown result type (might be due to invalid IL or missing references)
            //IL_006d: Expected O, but got Unknown
            //IL_006e: Expected O, but got Unknown
            //IL_0079: Unknown result type (might be due to invalid IL or missing references)
            //IL_007e: Unknown result type (might be due to invalid IL or missing references)
            //IL_008a: Expected O, but got Unknown
            //IL_008b: Expected O, but got Unknown
            //IL_0096: Unknown result type (might be due to invalid IL or missing references)
            //IL_009b: Unknown result type (might be due to invalid IL or missing references)
            //IL_00a7: Expected O, but got Unknown
            //IL_00a8: Expected O, but got Unknown
            //IL_00b3: Unknown result type (might be due to invalid IL or missing references)
            //IL_00b8: Unknown result type (might be due to invalid IL or missing references)
            //IL_00c4: Expected O, but got Unknown
            //IL_00c5: Expected O, but got Unknown
            //IL_00d0: Unknown result type (might be due to invalid IL or missing references)
            //IL_00d5: Unknown result type (might be due to invalid IL or missing references)
            //IL_00e1: Expected O, but got Unknown
            //IL_00e2: Expected O, but got Unknown
            //IL_00ed: Unknown result type (might be due to invalid IL or missing references)
            //IL_00f2: Unknown result type (might be due to invalid IL or missing references)
            //IL_0103: Expected O, but got Unknown
            //IL_0104: Expected O, but got Unknown
            string sql = "UPDATE WorkTime SET \r\n\t\t\t\tYear=:Year,Date1=:Date1,Date2=:Date2,AmTime1=:AmTime1,AmTime2=:AmTime2,PmTime1=:PmTime1,PmTime2=:PmTime2\r\n\t\t\t\tWHERE ID=:ID";

            OracleParameter[] obj = new OracleParameter[8];
            OracleParameter   val = new OracleParameter(":Year", 126, 50);

            ((DbParameter)val).Value = model.Year;
            obj[0] = val;
            OracleParameter val2 = new OracleParameter(":Date1", 106);

            ((DbParameter)val2).Value = model.Date1;
            obj[1] = val2;
            OracleParameter val3 = new OracleParameter(":Date2", 106);

            ((DbParameter)val3).Value = model.Date2;
            obj[2] = val3;
            OracleParameter val4 = new OracleParameter(":AmTime1", 126, 50);

            ((DbParameter)val4).Value = model.AmTime1;
            obj[3] = val4;
            OracleParameter val5 = new OracleParameter(":AmTime2", 126, 50);

            ((DbParameter)val5).Value = model.AmTime2;
            obj[4] = val5;
            OracleParameter val6 = new OracleParameter(":PmTime1", 126, 50);

            ((DbParameter)val6).Value = model.PmTime1;
            obj[5] = val6;
            OracleParameter val7 = new OracleParameter(":PmTime2", 126, 50);

            ((DbParameter)val7).Value = model.PmTime2;
            obj[6] = val7;
            OracleParameter val8 = new OracleParameter(":ID", 126, 50);

            ((DbParameter)val8).Value = model.ID;
            obj[7] = val8;
            OracleParameter[] parameter = (OracleParameter[])obj;
            return(dbHelper.Execute(sql, parameter));
        }
예제 #6
0
        public int Add(RoadFlow.Data.Model.WorkTime model)
        {
            //IL_0017: Unknown result type (might be due to invalid IL or missing references)
            //IL_001c: Unknown result type (might be due to invalid IL or missing references)
            //IL_002d: Expected O, but got Unknown
            //IL_002e: Expected O, but got Unknown
            //IL_0037: Unknown result type (might be due to invalid IL or missing references)
            //IL_003c: Unknown result type (might be due to invalid IL or missing references)
            //IL_004d: Expected O, but got Unknown
            //IL_004e: Expected O, but got Unknown
            //IL_0057: Unknown result type (might be due to invalid IL or missing references)
            //IL_005c: Unknown result type (might be due to invalid IL or missing references)
            //IL_006d: Expected O, but got Unknown
            //IL_006e: Expected O, but got Unknown
            //IL_0077: Unknown result type (might be due to invalid IL or missing references)
            //IL_007c: Unknown result type (might be due to invalid IL or missing references)
            //IL_008d: Expected O, but got Unknown
            //IL_008e: Expected O, but got Unknown
            //IL_0099: Unknown result type (might be due to invalid IL or missing references)
            //IL_009e: Unknown result type (might be due to invalid IL or missing references)
            //IL_00aa: Expected O, but got Unknown
            //IL_00ab: Expected O, but got Unknown
            //IL_00b6: Unknown result type (might be due to invalid IL or missing references)
            //IL_00bb: Unknown result type (might be due to invalid IL or missing references)
            //IL_00c7: Expected O, but got Unknown
            //IL_00c8: Expected O, but got Unknown
            //IL_00d3: Unknown result type (might be due to invalid IL or missing references)
            //IL_00d8: Unknown result type (might be due to invalid IL or missing references)
            //IL_00e4: Expected O, but got Unknown
            //IL_00e5: Expected O, but got Unknown
            //IL_00f0: Unknown result type (might be due to invalid IL or missing references)
            //IL_00f5: Unknown result type (might be due to invalid IL or missing references)
            //IL_0101: Expected O, but got Unknown
            //IL_0102: Expected O, but got Unknown
            string sql = "INSERT INTO WorkTime\r\n\t\t\t\t(ID,Year,Date1,Date2,AmTime1,AmTime2,PmTime1,PmTime2) \r\n\t\t\t\tVALUES(:ID,:Year,:Date1,:Date2,:AmTime1,:AmTime2,:PmTime1,:PmTime2)";

            OracleParameter[] obj = new OracleParameter[8];
            OracleParameter   val = new OracleParameter(":ID", 126, 50);

            ((DbParameter)val).Value = model.ID;
            obj[0] = val;
            OracleParameter val2 = new OracleParameter(":Year", 112);

            ((DbParameter)val2).Value = model.Year;
            obj[1] = val2;
            OracleParameter val3 = new OracleParameter(":Date1", 106);

            ((DbParameter)val3).Value = model.Date1;
            obj[2] = val3;
            OracleParameter val4 = new OracleParameter(":Date2", 106);

            ((DbParameter)val4).Value = model.Date2;
            obj[3] = val4;
            OracleParameter val5 = new OracleParameter(":AmTime1", 126, 50);

            ((DbParameter)val5).Value = model.AmTime1;
            obj[4] = val5;
            OracleParameter val6 = new OracleParameter(":AmTime2", 126, 50);

            ((DbParameter)val6).Value = model.AmTime2;
            obj[5] = val6;
            OracleParameter val7 = new OracleParameter(":PmTime1", 126, 50);

            ((DbParameter)val7).Value = model.PmTime1;
            obj[6] = val7;
            OracleParameter val8 = new OracleParameter(":PmTime2", 126, 50);

            ((DbParameter)val8).Value = model.PmTime2;
            obj[7] = val8;
            OracleParameter[] parameter = (OracleParameter[])obj;
            return(dbHelper.Execute(sql, parameter));
        }
예제 #7
0
 public int Update(RoadFlow.Data.Model.WorkTime model)
 {
     return(dataWorkTime.Update(model));
 }
예제 #8
0
 public int Add(RoadFlow.Data.Model.WorkTime model)
 {
     return(dataWorkTime.Add(model));
 }
예제 #9
0
        public int Update(RoadFlow.Data.Model.WorkTime model)
        {
            //IL_0014: Unknown result type (might be due to invalid IL or missing references)
            //IL_0019: Unknown result type (might be due to invalid IL or missing references)
            //IL_002a: Expected O, but got Unknown
            //IL_002b: Expected O, but got Unknown
            //IL_0034: Unknown result type (might be due to invalid IL or missing references)
            //IL_0039: Unknown result type (might be due to invalid IL or missing references)
            //IL_004a: Expected O, but got Unknown
            //IL_004b: Expected O, but got Unknown
            //IL_0054: Unknown result type (might be due to invalid IL or missing references)
            //IL_0059: Unknown result type (might be due to invalid IL or missing references)
            //IL_006a: Expected O, but got Unknown
            //IL_006b: Expected O, but got Unknown
            //IL_0079: Unknown result type (might be due to invalid IL or missing references)
            //IL_007e: Unknown result type (might be due to invalid IL or missing references)
            //IL_008a: Expected O, but got Unknown
            //IL_008b: Expected O, but got Unknown
            //IL_0099: Unknown result type (might be due to invalid IL or missing references)
            //IL_009e: Unknown result type (might be due to invalid IL or missing references)
            //IL_00aa: Expected O, but got Unknown
            //IL_00ab: Expected O, but got Unknown
            //IL_00b9: Unknown result type (might be due to invalid IL or missing references)
            //IL_00be: Unknown result type (might be due to invalid IL or missing references)
            //IL_00ca: Expected O, but got Unknown
            //IL_00cb: Expected O, but got Unknown
            //IL_00d9: Unknown result type (might be due to invalid IL or missing references)
            //IL_00de: Unknown result type (might be due to invalid IL or missing references)
            //IL_00ea: Expected O, but got Unknown
            //IL_00eb: Expected O, but got Unknown
            //IL_00f9: Unknown result type (might be due to invalid IL or missing references)
            //IL_00fe: Unknown result type (might be due to invalid IL or missing references)
            //IL_010f: Expected O, but got Unknown
            //IL_0110: Expected O, but got Unknown
            string sql = "UPDATE WorkTime SET \r\n\t\t\t\tYear=@Year,Date1=@Date1,Date2=@Date2,AmTime1=@AmTime1,AmTime2=@AmTime2,PmTime1=@PmTime1,PmTime2=@PmTime2\r\n\t\t\t\tWHERE ID=@ID";

            MySqlParameter[] obj = new MySqlParameter[8];
            MySqlParameter   val = new MySqlParameter("@Year", 3);

            ((DbParameter)val).Value = model.Year;
            obj[0] = val;
            MySqlParameter val2 = new MySqlParameter("@Date1", 12);

            ((DbParameter)val2).Value = model.Date1;
            obj[1] = val2;
            MySqlParameter val3 = new MySqlParameter("@Date2", 12);

            ((DbParameter)val3).Value = model.Date2;
            obj[2] = val3;
            MySqlParameter val4 = new MySqlParameter("@AmTime1", 253, 50);

            ((DbParameter)val4).Value = model.AmTime1;
            obj[3] = val4;
            MySqlParameter val5 = new MySqlParameter("@AmTime2", 253, 50);

            ((DbParameter)val5).Value = model.AmTime2;
            obj[4] = val5;
            MySqlParameter val6 = new MySqlParameter("@PmTime1", 253, 50);

            ((DbParameter)val6).Value = model.PmTime1;
            obj[5] = val6;
            MySqlParameter val7 = new MySqlParameter("@PmTime2", 253, 50);

            ((DbParameter)val7).Value = model.PmTime2;
            obj[6] = val7;
            MySqlParameter val8 = new MySqlParameter("@ID", 253, 50);

            ((DbParameter)val8).Value = model.ID;
            obj[7] = val8;
            MySqlParameter[] parameter = (MySqlParameter[])obj;
            return(dbHelper.Execute(sql, parameter));
        }
예제 #10
0
        public int Add(RoadFlow.Data.Model.WorkTime model)
        {
            //IL_001a: Unknown result type (might be due to invalid IL or missing references)
            //IL_001f: Unknown result type (might be due to invalid IL or missing references)
            //IL_0030: Expected O, but got Unknown
            //IL_0031: Expected O, but got Unknown
            //IL_0039: Unknown result type (might be due to invalid IL or missing references)
            //IL_003e: Unknown result type (might be due to invalid IL or missing references)
            //IL_004f: Expected O, but got Unknown
            //IL_0050: Expected O, but got Unknown
            //IL_0059: Unknown result type (might be due to invalid IL or missing references)
            //IL_005e: Unknown result type (might be due to invalid IL or missing references)
            //IL_006f: Expected O, but got Unknown
            //IL_0070: Expected O, but got Unknown
            //IL_0079: Unknown result type (might be due to invalid IL or missing references)
            //IL_007e: Unknown result type (might be due to invalid IL or missing references)
            //IL_008f: Expected O, but got Unknown
            //IL_0090: Expected O, but got Unknown
            //IL_009e: Unknown result type (might be due to invalid IL or missing references)
            //IL_00a3: Unknown result type (might be due to invalid IL or missing references)
            //IL_00af: Expected O, but got Unknown
            //IL_00b0: Expected O, but got Unknown
            //IL_00be: Unknown result type (might be due to invalid IL or missing references)
            //IL_00c3: Unknown result type (might be due to invalid IL or missing references)
            //IL_00cf: Expected O, but got Unknown
            //IL_00d0: Expected O, but got Unknown
            //IL_00de: Unknown result type (might be due to invalid IL or missing references)
            //IL_00e3: Unknown result type (might be due to invalid IL or missing references)
            //IL_00ef: Expected O, but got Unknown
            //IL_00f0: Expected O, but got Unknown
            //IL_00fe: Unknown result type (might be due to invalid IL or missing references)
            //IL_0103: Unknown result type (might be due to invalid IL or missing references)
            //IL_010f: Expected O, but got Unknown
            //IL_0110: Expected O, but got Unknown
            string sql = "INSERT INTO WorkTime\r\n\t\t\t\t(ID,Year,Date1,Date2,AmTime1,AmTime2,PmTime1,PmTime2) \r\n\t\t\t\tVALUES(@ID,@Year,@Date1,@Date2,@AmTime1,@AmTime2,@PmTime1,@PmTime2)";

            MySqlParameter[] obj = new MySqlParameter[8];
            MySqlParameter   val = new MySqlParameter("@ID", 253, 50);

            ((DbParameter)val).Value = model.ID;
            obj[0] = val;
            MySqlParameter val2 = new MySqlParameter("@Year", 3);

            ((DbParameter)val2).Value = model.Year;
            obj[1] = val2;
            MySqlParameter val3 = new MySqlParameter("@Date1", 12);

            ((DbParameter)val3).Value = model.Date1;
            obj[2] = val3;
            MySqlParameter val4 = new MySqlParameter("@Date2", 12);

            ((DbParameter)val4).Value = model.Date2;
            obj[3] = val4;
            MySqlParameter val5 = new MySqlParameter("@AmTime1", 253, 50);

            ((DbParameter)val5).Value = model.AmTime1;
            obj[4] = val5;
            MySqlParameter val6 = new MySqlParameter("@AmTime2", 253, 50);

            ((DbParameter)val6).Value = model.AmTime2;
            obj[5] = val6;
            MySqlParameter val7 = new MySqlParameter("@PmTime1", 253, 50);

            ((DbParameter)val7).Value = model.PmTime1;
            obj[6] = val7;
            MySqlParameter val8 = new MySqlParameter("@PmTime2", 253, 50);

            ((DbParameter)val8).Value = model.PmTime2;
            obj[7] = val8;
            MySqlParameter[] parameter = (MySqlParameter[])obj;
            return(dbHelper.Execute(sql, parameter));
        }