public static Model.Error404 GetError404Model(DataRow row) { Model.Error404 objModel = new General.ErrorLogging.Model.Error404(); objModel.ID = SqlConvert.ToInt32(row["Error404ID"]); objModel.AppID = SqlConvert.ToInt32(row["Error404AppID"]); objModel.Environment = (Environment.EnvironmentContext)SqlConvert.ToInt16(row["Error404EnvironmentID"]); if (row["Error404ClientID"] != DBNull.Value) { objModel.ClientID = SqlConvert.ToString(row["Error404ClientID"]); } if (row["Error404FirstTime"] != DBNull.Value) { objModel.FirstTime = (DateTimeOffset)row["Error404FirstTime"]; } if (row["Error404LastTime"] != DBNull.Value) { objModel.LastTime = (DateTimeOffset)row["Error404LastTime"]; } objModel.URL = SqlConvert.ToString(row["Error404URL"]); objModel.Count = SqlConvert.ToInt16(row["Error404Count"]); objModel.Hide = SqlConvert.ToBoolean(row["Error404Hide"]); objModel.UserAgent = SqlConvert.ToString(row["Error404UserAgent"]); objModel.Detail = SqlConvert.ToString(row["Error404Detail"]); if (row.Table.Columns.Contains("AppURL")) { objModel.AppName = SqlConvert.ToString(row["AppName"]); objModel.AppURL = SqlConvert.ToString(row["AppURL"]); } return(objModel); }
public static Model.Error404Redirect GetError404RedirectModel(DataRow row) { Model.Error404Redirect objModel = new General.ErrorLogging.Model.Error404Redirect(); objModel.ID = SqlConvert.ToInt32(row["Error404RedirectID"]); objModel.AppID = SqlConvert.ToInt32(row["Error404RedirectAppID"]); objModel.ClientID = SqlConvert.ToString(row["Error404RedirectClientID"]); if (row["Error404RedirectCreateDate"] != DBNull.Value) { objModel.CreateDate = (DateTimeOffset)row["Error404RedirectCreateDate"]; } if (row["Error404RedirectModifyDate"] != DBNull.Value) { objModel.ModifyDate = (DateTimeOffset)row["Error404RedirectModifyDate"]; } objModel.RedirectType = SqlConvert.ToInt16(row["Error404RedirectRedirectType"]); objModel.From = SqlConvert.ToString(row["Error404RedirectFrom"]); objModel.To = SqlConvert.ToString(row["Error404RedirectTo"]); if (row["Error404RedirectFirstTime"] != DBNull.Value) { objModel.FirstTime = (DateTimeOffset)row["Error404RedirectFirstTime"]; } if (row["Error404RedirectLastTime"] != DBNull.Value) { objModel.LastTime = (DateTimeOffset)row["Error404RedirectLastTime"]; } objModel.Count = SqlConvert.ToInt32(row["Error404RedirectCount"]); if (row.Table.Columns.Contains("AppURL")) { objModel.AppName = SqlConvert.ToString(row["AppName"]); objModel.AppURL = SqlConvert.ToString(row["AppURL"]); } return(objModel); }