protected void Button3_Click(object sender, EventArgs e) { PlaceHolder3.Visible = !PlaceHolder3.Visible; if (PlaceHolder3.Visible) { HourFinish.Focus(); } }
void FillLabels() { lPrinyalDate.Text = " с " + CalendarStart.SelectedDate.ToLongDateString() + " по " + CalendarStartEnd.SelectedDate.ToLongDateString(); if (HourStart.IsAllSelected()) { lPHours.Text = " все"; } else { List <int> sel = HourStart.GetSelectedTitles(); lPHours.Text = string.Empty; foreach (int i in sel) { if (string.IsNullOrEmpty(lPHours.Text)) { lPHours.Text += i.ToString(); } else { lPHours.Text += ", " + i.ToString(); } } } if (MinuteStart.IsAllSelected()) { lPMinutes.Text = " все"; } else { List <int> sel = MinuteStart.GetSelectedTitles(); lPMinutes.Text = string.Empty; foreach (int i in sel) { if (string.IsNullOrEmpty(lPMinutes.Text)) { lPMinutes.Text += i.ToString(); } else { lPMinutes.Text += ", " + i.ToString(); } } } if (_role != "Worker") { lVypolnilDate.Text = " с " + CalendarFinish.SelectedDate.ToLongDateString() + " по " + CalendarFinishEnd.SelectedDate.ToLongDateString(); } else { lVypolnilDate.Text = " в любое время"; } if (HourFinish.IsAllSelected()) { lVHours.Text = " все"; } else { List <int> sel = HourFinish.GetSelectedTitles(); lVHours.Text = string.Empty; foreach (int i in sel) { if (string.IsNullOrEmpty(lVHours.Text)) { lVHours.Text += i.ToString(); } else { lVHours.Text += ", " + i.ToString(); } } } if (MinuteFinish.IsAllSelected()) { lVMinutes.Text = " все"; } else { List <int> sel = MinuteFinish.GetSelectedTitles(); lVMinutes.Text = string.Empty; foreach (int i in sel) { if (string.IsNullOrEmpty(lVMinutes.Text)) { lVMinutes.Text += i.ToString(); } else { lVMinutes.Text += ", " + i.ToString(); } } } if (IsAllSelected(IdU)) { lU.Text = " любой"; } else { lU.Text = GetSelected(IdU); } if (IsAllSelected(IdM)) { lM.Text = " любой"; } else { lM.Text = GetSelected(IdM); } if (IsAllSelected(IdL)) { lL.Text = " любой"; } else { lL.Text = GetSelected(IdL); } if (IsAllSelected(Address)) { if (GetSelectedTitles(IdU).Count == 1 && GetSelectedTitles(IdM).Count == 1) { KOS.App_Code.Base db = new App_Code.Base(WebConfigurationManager.ConnectionStrings["DefaultConnection"].ToString()); List <string> ls = db.GetAddress(GetSelectedTitles(IdU)[0], GetSelectedTitles(IdM)[0]); lAddress.Text = string.Empty; foreach (string s in ls) { if (!string.IsNullOrEmpty(lAddress.Text)) { lAddress.Text += ", "; } lAddress.Text += s; } } else { lAddress.Text = " любой"; } } else { lAddress.Text = GetSelected(Address); } if (IsAllSelected(Category)) { lCategory.Text = " любая"; } else { lCategory.Text = GetSelected(Category); } if (IsAllSelected(From)) { lSource.Text = " любой"; } else { lSource.Text = GetSelected(From); } if (IsAllSelected(Prinyal)) { lPrinyal.Text = " любой"; } else { lPrinyal.Text = GetSelected(Prinyal); } if (_role == "Worker") { App_Code.Base db = new App_Code.Base(WebConfigurationManager.ConnectionStrings["DefaultConnection"].ToString()); App_Code.Base.UserInfo ui = db.GetUserInfo(Page.User.Identity.Name); lWorker.Text = ui.Family + " " + ui.IO; } else if (IsAllSelected(Worker)) { lWorker.Text = " любой"; } else { lWorker.Text = GetSelected(Worker); } }