public List <DelphiReport> GetAppointment(int bakhsh) { DelphiReport dr = new DelphiReport(); DelphiReport dr2 = new DelphiReport(); GetAppFake(bakhsh, dr, dr2); //GetAppReal(bakhsh, dr, dr2); delphiReps.Add(dr); return(delphiReps); }
private static void GetAppFake(int bakhsh, DelphiReport dr, DelphiReport dr2) { dr.id = bakhsh * 10 + bakhsh; dr2.id = bakhsh * 10 + bakhsh; DateTime dt = DateTime.FromOADate(39456); dr2.date = dt.ToString(); DateTime MyDate = new DateTime(1904, 12, 12, 1, 4, 1); double MyDouble = MyDate.ToOADate(); dr.date = MyDouble.ToString(); if ((bakhsh % 2) == 1) { PersianCalendar pc = new PersianCalendar(); DateTime thisDate = DateTime.Now; thisDate.AddDays(1); //PC=PersianCalendar.ToDateTime(now.Year,now.Month,now.Day,now.Hour,now.Minute,0,0); dr.date = pc.GetYear(thisDate) + "/0" + pc.GetMonth(thisDate) + "/" + pc.GetDayOfMonth(thisDate); //(if) ? then : else int happ = thisDate.Minute < 10 ? thisDate.Minute + 10 : 15 + (thisDate.Minute % 3); dr.time = happ.ToString() + ":01"; //dr.date= PC.ToDateTime( } else { PersianCalendar pc = new PersianCalendar(); DateTime thisDate = DateTime.Now; thisDate.AddDays(2); //PC=PersianCalendar.ToDateTime(now.Year,now.Month,now.Day,now.Hour,now.Minute,0,0); dr.date = pc.GetYear(thisDate) + "/0" + pc.GetMonth(thisDate) + "/" + pc.GetDayOfMonth(thisDate); //(if) ? then : else int happ = thisDate.Minute < 11 ? thisDate.Minute + 11 : 11 + (thisDate.Minute % 4); dr.time = happ.ToString() + ":01"; //dr.time = "18:01"; } //full //if (FullDepartments) //{ // dr.date = ""; // dr.time = ""; //} }
private void GetAppReal(int bakhsh, DelphiReport dr, DelphiReport dr2) { ifNewDayInitializeFromsettingAppTables(); }