protected bool checkOrderWeek(WeekObj obj) { if (obj.flag != DBNull.Value) { if ((string)obj.flag == "1") { if ((DateTime)obj.day > DateTime.Now) { return(true); } else { return(false); } } else { return(false); } } else { return(false); } }
protected void setCloseDate(WeekObj obj, int offset) { if (obj.flag != DBNull.Value) { if ((string)obj.flag == "1") { var d = (DateTime)obj.close; obj.day = d.AddDays(offset); } } }