protected void LnkOtherApp_Click(object sender, EventArgs e) { GrdHistory.DataSource = null; GrdHistory.DataBind(); LnkOtherApp.Visible = false; LnkOtherApp.CommandArgument = (int.Parse(LnkOtherApp.CommandArgument) + 20)._ToString(); bool Cache = true; // Əgər filter olunubsa Cache-de saxlamayaq if (BtnSearch.CommandArgument == "1") { Cache = false; } DALC.DataTableResult HistoryTypes = DALC.GetHistory(LnkOtherApp.CommandArgument, DListOrganization.SelectedValue, DListUsersName.SelectedValue, DListHistoryTypes.SelectedValue, DListPermissionsType.SelectedValue, PersonsID.IsEmptyReplaceNoul("-1"), Cache); if (HistoryTypes.Count == -1) { Config.MsgBoxAjax(Config._DefaultSystemErrorMessages, Page); return; } GrdHistory.DataSource = HistoryTypes.Dt; GrdHistory.DataBind(); if (HistoryTypes.Dt.Rows.Count > 0) { LnkOtherApp.Visible = (GrdHistory.Rows.Count < HistoryTypes.Count); } BtnSearch.CommandArgument = ""; }
protected void LnkOtherApp_Click(object sender, EventArgs e) { GrdHistory.DataSource = null; GrdHistory.DataBind(); LnkOtherApp.Visible = false; LblCount.Text = "Axtarış üzrə: 0 Səhifə üzrə: 0"; LnkOtherApp.CommandArgument = (int.Parse(LnkOtherApp.CommandArgument) + 20)._ToString(); Dictionary <string, object> DictHistory = new Dictionary <string, object>(); DictHistory.Add("AdoptionAdministratorsID", int.Parse(DListUsersName.SelectedValue)); DALC.DataTableResult AdoptionAdministratorHistory = DALC_Adoption.GetAdoptionAdministratorHistory(int.Parse(LnkOtherApp.CommandArgument), DictHistory, ""); if (AdoptionAdministratorHistory.Count == -1) { Config.MsgBoxAjax(Config._DefaultSystemErrorMessages, Page); return; } GrdHistory.DataSource = AdoptionAdministratorHistory.Dt; GrdHistory.DataBind(); LblCount.Text = "Axtarış üzrə: " + AdoptionAdministratorHistory.Count + " Səhifə üzrə: " + GrdHistory.Rows.Count._ToString(); if (AdoptionAdministratorHistory.Dt.Rows.Count > 0) { LnkOtherApp.Visible = (GrdHistory.Rows.Count < AdoptionAdministratorHistory.Count); } BtnSearch.CommandArgument = ""; }
protected void Page_Load(object sender, EventArgs e) { //Login control if (DALC._GetUsersLogin == null) { Config.Redirect("/?return=" + Request.Url.ToString()); return; } if (!IsPostBack) { LblCount1.Text = DALC.GetDbSingleValues("Count(*)", "Persons", ""); LblCount2.Text = DALC.GetDbSingleValues("Count(*)", "Users", "Where IsActive=1"); LblCount3.Text = DALC.GetDbSingleValues("Count(*)", "UsersHistory", "where YEAR(Add_Dt)=YEAR(GETDATE()) and MONTH(Add_Dt) = MONTH(GETDATE())"); LblCount4.Text = DALC.GetDbSingleValues("Count(*)", "UsersHistory", "where FORMAT(Add_Dt,'ddMMyyyy')=FORMAT(GETDATE(),'ddMMyyyy')"); DALC.DataTableResult HistoryTypes = DALC.GetHistory("10", DALC._GetUsersLogin.OrganizationsID._ToString(), "0", "0", "0"); GrdHistory.DataSource = HistoryTypes.Dt; GrdHistory.DataBind(); } }