예제 #1
0
 public static int AddImportLog(ChannelLogEnum type, int channelId, int tryed, int success)
 {
     ImportLog log = new ImportLog();
     log.ChannelId = channelId;
     log.LogDate = DateTime.Now;
     log.LogType = (int)type;
     log.Tryed = tryed;
     log.Success = success;
     CanonDataContext db = Cdb.Instance;
     db.ImportLogs.InsertOnSubmit(log);
     db.SubmitChanges();
     return log.LogId;
 }
예제 #2
0
        public static int AddImportLog(ChannelLogEnum type, int channelId, int tryed, int success)
        {
            ImportLog log = new ImportLog();

            log.ChannelId = channelId;
            log.LogDate   = DateTime.Now;
            log.LogType   = (int)type;
            log.Tryed     = tryed;
            log.Success   = success;
            CanonDataContext db = Cdb.Instance;

            db.ImportLogs.InsertOnSubmit(log);
            db.SubmitChanges();
            return(log.LogId);
        }
예제 #3
0
        protected void gridMainLog_HtmlRowPrepared(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewTableRowEventArgs e)
        {
            if (e.RowType != DevExpress.Web.ASPxGridView.GridViewRowType.Data)
            {
                return;
            }
            ChannelLogEnum value = (ChannelLogEnum)e.GetValue("LogType");

            if (value == ChannelLogEnum.ChannelError)
            {
                e.Row.BackColor = System.Drawing.Color.Red;
            }
            else if (value == ChannelLogEnum.ProductError)
            {
                e.Row.BackColor = System.Drawing.Color.Orange;
            }
        }