示例#1
0
        protected void ctlExchangeGrid_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            if (e.CommandName == "UserEdit")
            {
                int   rowIndex       = ((GridViewRow)((ImageButton)e.CommandSource).NamingContainer).RowIndex;
                short ExchangeRateId = Convert.ToInt16(ctlExchangeGrid.DataKeys[rowIndex].Value);
                ctlExchangeForm.PageIndex = (ctlExchangeGrid.PageIndex * ctlExchangeGrid.PageSize) + rowIndex;
                ctlExchangeForm.ChangeMode(FormViewMode.Edit);
                IList <DbExchangeRate> exchangeRateList = new List <DbExchangeRate>();
                DbExchangeRate         exchangeRate     = SsDbQueryProvider.DbExchangeRateQuery.FindByIdentity(ExchangeRateId);
                exchangeRateList.Add(exchangeRate);

                ctlExchangeForm.DataSource = exchangeRateList;
                ctlExchangeForm.DataBind();

                UpdatePanelExchangeForm.Update();
                ctlExchangeModalPopupExtender.Show();
            }
        }
示例#2
0
 protected void ctlExchangeAddNew_Click(object sender, ImageClickEventArgs e)
 {
     ctlExchangeModalPopupExtender.Show();
     ctlExchangeForm.ChangeMode(FormViewMode.Insert);
     UpdatePanelExchangeForm.Update();
 }