protected void btnChangePassword_Click(object sender, EventArgs e) { userid = (int)Session["UserId"]; hfUserID.Value = userid.ToString(); EditPopup.Show(); pnlAddPopup.Visible = true; }
protected void ibtnEdit_Click(object sender, ImageClickEventArgs e) { GridViewRow gvRow = (GridViewRow)((ImageButton)sender).NamingContainer; Int32 id = Convert.ToInt32(gridIncomeCategories.DataKeys[gvRow.RowIndex].Value); DataTable dt = blc.GetIncomeCategoryById(id); hfUserID.Value = dt.Rows[0]["incomeCatId"].ToString(); txteditCategory.Text = dt.Rows[0]["incomeCatName"].ToString(); pnlAddPopup.Visible = true; EditPopup.Show(); }
protected void ibtnEdit_Click(object sender, ImageClickEventArgs e) { GridViewRow gvRow = (GridViewRow)((ImageButton)sender).NamingContainer; Int32 incomeid = Convert.ToInt32(GridView1.DataKeys[gvRow.RowIndex].Value); DataTable dtbl = bli.GetIncomeByIncomeId(incomeid); showPopupCategory(); hfUserID.Value = dtbl.Rows[0]["incomeId"].ToString(); ddleditCategory.Text = dtbl.Rows[0]["incomeCatId"].ToString(); txteditAmount.Text = dtbl.Rows[0]["incomeAmount"].ToString(); txteditDate.Text = Convert.ToDateTime(dtbl.Rows[0]["incomeDate"]).ToShortDateString(); txteditDescription.Text = dtbl.Rows[0]["incomeDescription"].ToString(); pnlAddPopup.Visible = true; EditPopup.Show(); }
protected void Page_PreRender(object sender, EventArgs e) { Currency currency = CurrencyDataSource.Load(this.CurrencyId); if (currency != null) { //LOAD FORM Name.Text = currency.Name; AutoUpdate.Checked = currency.AutoUpdate; ManualUpdate.Checked = !AutoUpdate.Checked; ExchangeRate.Text = currency.ExchangeRate.ToString("#.####"); ISOCode.Text = currency.ISOCode; ISOCodePattern.SelectedIndex = (int)currency.ISOCodePattern; CurrencySymbol.Text = currency.CurrencySymbol; PositivePattern.SelectedIndex = (int)currency.PositivePattern; NegativePattern.SelectedIndex = (int)currency.NegativePattern; NegativeSign.Text = currency.NegativeSign; DecimalSeparator.Text = currency.DecimalSeparator; DecimalDigits.Text = currency.DecimalDigits.ToString(); GroupSeparator.Text = currency.GroupSeparator; GroupSizes.Text = currency.GroupSizes; trExchangeRate1.Visible = !currency.IsBaseCurrency; trExchangeRate2.Visible = trExchangeRate1.Visible; if (trExchangeRate1.Visible) { ExchangeRateHelpText.Text = string.Format(ExchangeRateHelpText.Text, AbleContext.Current.Store.BaseCurrency.Name); } EditCaption.Text = string.Format(EditCaption.Text, currency.Name); EditPopup.OnCancelScript = String.Format("__doPostBack('{0}','{1}')", CancelButton.UniqueID, ""); EditPopup.Show(); } else { this.Controls.Clear(); } }
protected void OrderNotesGrid_RowCommand(object sender, GridViewCommandEventArgs e) { int orderNoteId = AlwaysConvert.ToInt(e.CommandArgument); if (e.CommandName == "EditNote") { OrderNote n = OrderNoteDataSource.Load(orderNoteId); EditComment.Text = n.Comment; EditIsPrivate.Checked = n.IsPrivate; EditIsRead.Checked = n.IsRead; EditId.Value = orderNoteId.ToString(); EditPopup.Show(); } else if (e.CommandName == "DeleteNote") { int index = _Order.Notes.IndexOf(orderNoteId); if (index > -1) { _Order.Notes.DeleteAt(index); } BindOrderNotes(); } }
protected void btnCancel_Click(object sender, EventArgs e) { EditPopup.Hide(); }