public Log ConvertToCampLog(DataRow row) { return(new Log() { LogID = row.Field <Int32>("CampaignLogID"), ModifiedOn = MppUtility.FullDateString(row.Field <DateTime>("ModifiedOn")), ModifiedField = row.Field <String>("ModifiedField"), OldValue = row.Field <String>("OldValue"), NewValue = row.Field <String>("NewValue"), Time = MppUtility.TimeToString(row.Field <DateTime>("ModifiedOn")), }); }
public Log ConvertToKeyLog(DataRow row, int type) { return(new Log() { RevertStatus = (type != 1)? row.Field <Int32>("RevertStatus"): 0, PopUpID = row.Field <Int32>("PopUpID"), ModifiedOn = MppUtility.FullDateString(row.Field <DateTime>("ModifiedOn")), ModifiedOn1 = row.Field <DateTime>("ModifiedOn").ToString("yyyy-MM-dd"), MatchType = (type != 1) ? row.Field <String>("MatchType"): "", ModifiedField = row.Field <String>("ModifiedField"), OldValue = row.Field <String>("OldValue"), NewValue = row.Field <String>("NewValue"), KeywordID = (type != 1) ? row.Field <Int64>("KeywordID"): 0, ReportID = (type != 1) ? row.Field <Int32>("ReportID"): 0, ReasonID = (type != 1) ? row.Field <Int32>("ReasonID"): 0, CampID = (type != 1) ? row.Field <Int64>("CampaignID"): 0, AdGroupID = (type != 1) ? row.Field <Int64>("AdgroupID"): 0, KeywordName = row.Field <String>("KeyName"), AdGroupName = row.Field <String>("AdGroupName"), Reason = row.Field <String>("Reasondesc") }); }
private Log ConvertToOptimizedData(DataRow row, int type) { return(new Log() { CampID = (type == 0) ? row.Field <Int64>("CiD") : 0, CampaignName = (type == 0) ? row.Field <String>("campaign") : "", KeywordName = (type == 1) ? row.Field <String>("Keyword") : "", MatchType = (type != 0) ? row.Field <String>("MatchType") : "", ModifiedField = (type != 0) ? row.Field <String>("ModifiedField") : "", ModifiedOn = MppUtility.FullDateString(row.Field <DateTime>("Date")), OldValue = (type != 0) ? row.Field <String>("OldValue") : "", NewValue = (type != 0) ? row.Field <String>("NewValue") : "", //ReportID = (type != 0) ? row.Field<Int32>("ReportID"):0, ReasonID = (type != 0) ? row.Field <Int32>("ReasonID") : 0, //AdGroupName = (type != 0) ? row.Field<String>("AdGroupName"):"", //Reason = (type != 0) ? row.Field<String>("Reasondesc"):"" }); }