//private void BindStore() //{ // //DropDownListStore.DataSource = Store.GetStoreListByLocationId(Convert.ToInt32(DropDownListLocation.SelectedValue)); // DropDownListStore.DataSource = Store.GetStoreListByAccountId(Account.GetAccountByUserName(Page.User.Identity.Name.ToString()).AccountId); // DropDownListStore.DataTextField = "Description"; // DropDownListStore.DataValueField = "StoreId"; // DropDownListStore.DataBind(); // DropDownListStore.Items.Insert(0, new ListItem("Please select", "0")); //} protected void DropDownListLocation_SelectedIndexChanged(object sender, EventArgs e) { //BindStore(); //ListBoxClaimMonth.Items.Clear(); //GridViewResult.DataBind(); //TextBoxClaimNumber.Text = ""; //ButtonSaveList.Visible = false; ListBoxClaimMonth.DataSource = StoreRep.Web.Code.Claim.GetClaimMonthByLocation(Convert.ToInt32(DropDownListLocation.SelectedValue), Account.GetAccountByUserName(Page.User.Identity.Name.ToString()).AccountId); ListBoxClaimMonth.DataTextField = "FormattedClaimDate"; //ListBoxClaimMonth.DataValueField = "ClaimScheduleId"; ListBoxClaimMonth.DataBind(); ListBoxClaimMonth.Enabled = ListBoxClaimMonth.Items.Count > 0; GridViewResult.DataBind(); TextBoxClaimNumber.Text = ""; RadioButtonPaid.Checked = false; RadioButtonUnpaid.Checked = false; ButtonSaveList.Visible = false; ButtonFNBPreview.Visible = false; //ButtonSaveResend.Visible = false; if (ListBoxClaimMonth.Items.Count == 0) { ListBoxClaimMonth.Items.Clear(); } else { //ListBoxClaimMonth.Items.Insert(0, new ListItem("ALL", "0")); } }
protected void DropDownListStore_SelectedIndexChanged(object sender, EventArgs e) { if (Roles.IsUserInRole("RepClaim")) { BindRepStoreClaimMonth(); return; } ListBoxClaimMonth.DataSource = ClaimSku.GetClaimSkuMonthByStore(Convert.ToInt32(DropDownListStore.SelectedValue), Account.GetAccountByUserName(Page.User.Identity.Name.ToString()).AccountId); ListBoxClaimMonth.DataTextField = "FormattedClaimDate"; //ListBoxClaimMonth.DataValueField = "ClaimSkuId"; ListBoxClaimMonth.DataBind(); ListBoxClaimMonth.Enabled = ListBoxClaimMonth.Items.Count > 0; GridViewResult.DataBind(); TextBoxClaimNumber.Text = ""; if (ListBoxClaimMonth.Items.Count == 0) { ListBoxClaimMonth.Items.Clear(); } else { ListBoxClaimMonth.Items.Insert(0, new ListItem("ALL", "0")); } }
protected void DropDownListLocation_SelectedIndexChanged(object sender, EventArgs e) { ListBoxClaimMonth.DataSource = StoreRep.Web.Code.Claim.GetClaimMonthByLocation(Convert.ToInt32(DropDownListLocation.SelectedValue), Account.GetAccountByUserName(Page.User.Identity.Name.ToString()).AccountId); ListBoxClaimMonth.DataTextField = "FormattedClaimDate"; ListBoxClaimMonth.DataBind(); ListBoxClaimMonth.Enabled = ListBoxClaimMonth.Items.Count > 0; if (ListBoxClaimMonth.Items.Count == 0) { ListBoxClaimMonth.Items.Clear(); } ButtonGenerateReport.Enabled = false; }
private void BindRepStoreClaimMonth() { ListBoxClaimMonth.DataSource = ClaimSku.GetClaimSkuMonthByStoreAndUserName(Convert.ToInt32(DropDownListStore.SelectedValue), Page.User.Identity.Name.ToString()); ListBoxClaimMonth.DataTextField = "FormattedClaimDate"; //ListBoxClaimMonth.DataValueField = "ClaimSkuId"; ListBoxClaimMonth.DataBind(); ListBoxClaimMonth.Enabled = ListBoxClaimMonth.Items.Count > 0; GridViewResult.DataBind(); TextBoxClaimNumber.Text = ""; if (ListBoxClaimMonth.Items.Count == 0) { ListBoxClaimMonth.Items.Clear(); } else { ListBoxClaimMonth.Items.Insert(0, new ListItem("ALL", "0")); } }