示例#1
0
        private void timer1_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
        {
            string TimePhase = System.Configuration.ConfigurationSettings.AppSettings["TimePhase"].ToString();

            if (DateTime.Now.ToString("HH:mm:ss") == TimePhase)
            {
                IConstructInterface construct = new ConstructService();;
                var result = construct.GetConstruct();
                foreach (var model in result)
                {
                    SmsMessage c        = new SmsMessage();
                    var        smsState = c.SendMessages(model.Phone, model.ConstName, model.Phase.Value, model.Role);

                    //SmsMessage c = new SmsMessage();
                    //var smsState = "0";//c.SendMessages(model.Phone, model.ConstName, model.Phase.Value, model.Role);

                    if (smsState == "0")
                    {
                        Mapper.Initialize(x => x.CreateMap <SMSEvalLogDTO, SMSEvalLog>());
                        SMSEvalLog sms = Mapper.Map <SMSEvalLogDTO, SMSEvalLog>(model);
                        sms.CreateTime = DateTime.Now;

                        construct.AddSMSLog(sms);
                    }
                }
            }
        }
示例#2
0
 protected CommandTextEventInfo ConstructUpdateSql(TEntity entityToUpdate, IEnumerable <Expression <Func <TEntity, object> > > updateFields, WhereClauseResult whereClause)
 => ConstructService.ConstructUpdateSql <TKey, TEntity>(LogicFields, entityToUpdate, updateFields, whereClause);
示例#3
0
 protected CommandTextEventInfo ConstructUpdateSql(TEntity entityToUpdate, IEnumerable <Expression <Func <TEntity, object> > > updateFields, Expression <Func <TEntity, object> > id, TKey value)
 => ConstructService.ConstructUpdateSql(LogicFields, entityToUpdate, updateFields, id, value);
示例#4
0
 public Form1()
 {
     this.constructService = new ConstructService();
     InitializeComponent();
 }
示例#5
0
 protected CommandTextEventInfo ConstructSingleSql(IEnumerable <Expression <Func <TEntity, object> > > selectFields, Expression <Func <TEntity, object> > id, TKey value)
 => ConstructService.ConstructSingleSql(LogicFields, selectFields, id, value);
示例#6
0
 protected CommandTextEventInfo ConstructCountSql(Expression <Func <TEntity, object> > member, WhereClauseResult whereClause)
 => ConstructService.ConstructCountSql <TKey, TEntity>(member, whereClause);
示例#7
0
 protected CommandTextEventInfo ConstructExistsSql(WhereClauseResult whereClause)
 => ConstructService.ConstructExistsSql(typeof(TEntity), whereClause);
示例#8
0
 protected CommandTextEventInfo ConstructInsertSql(TEntity entityToInsert, IEnumerable <Expression <Func <TEntity, object> > > ignoredFields, bool autoIncrement)
 => ConstructService.ConstructInsertSql <TKey, TEntity>(LogicFields, entityToInsert, ignoredFields, autoIncrement);
 protected CommandTextEventInfo ConstructTakeSql(int take, IEnumerable <Expression <Func <TEntity, object> > > selectFields, WhereClauseResult whereClause, OrderbyClauseResult orderbyClause)
 => ConstructService.ConstructTakeSql <TKey, TEntity>(LogicFields, take, selectFields, whereClause, orderbyClause);
示例#10
0
 protected OrderbyClauseResult CreateDefaultOrderbyClause()
 => ConstructService.ConstructOrderbyClause <TKey, TEntity>(DefaultOrderbyField, DefaultOrderbyType);
 protected CommandTextEventInfo ConstructDeleteSql(Expression <Func <TEntity, object> > id, TKey value)
 => ConstructService.ConstructDeleteSql(id, value);