示例#1
0
 protected void ctlBtnAddBank_Click(object sender, ImageClickEventArgs e)
 {
     BankLangGridViewFinish();
     ctlBankFormView.DataSource = null;
     ctlBankFormView.ChangeMode(FormViewMode.Insert);
     UpdatePanelBankForm.Update();
     ctlBankModalPopupExtender.Show();
 }
示例#2
0
 protected void ctlBankFormView_ItemCommand(object sender, FormViewCommandEventArgs e)
 {
     if (e.CommandName == "Cancel")
     {
         ctlBankModalPopupExtender.Hide();
         UpdatePanelBankForm.Update();
         ctlGridBank.DataCountAndBind();
     }
 }
示例#3
0
        protected void ctlGridBank_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            if (e.CommandName == "BankEdit")
            {
                int   rowIndex = ((GridViewRow)((ImageButton)e.CommandSource).NamingContainer).RowIndex;
                short bankId   = UIHelper.ParseShort(ctlGridBank.DataKeys[rowIndex].Value.ToString());

                ctlGridBank.EditIndex = rowIndex;
                IList <DbBank> bankList = new List <DbBank>();
                DbBank         bank     = DbBankService.FindByIdentity(bankId);

                bankList.Add(bank);

                ctlBankFormView.DataSource = bankList;
                ctlBankFormView.PageIndex  = 0;

                ctlBankFormView.ChangeMode(FormViewMode.Edit);
                ctlBankFormView.DataBind();

                UpdatePanelBankForm.Update();
                ctlBankModalPopupExtender.Show();
                BankLangGridViewFinish();
            }
            else if (e.CommandName == "Select")
            {
                int   rowIndex = ((GridViewRow)((LinkButton)e.CommandSource).NamingContainer).RowIndex;
                short bankId   = UIHelper.ParseShort(ctlGridBank.DataKeys[rowIndex].Value.ToString());

                ctlBankLangGrid.DataSource = DbBankLangService.FindByBankId(bankId);
                ctlBankLangGrid.DataBind();

                if (ctlBankLangGrid.Rows.Count > 0)
                {
                    ctlSubmit.Visible          = true;
                    ctlCancel.Visible          = true;
                    ctlBankLangLangFds.Visible = true;
                }
                else
                {
                    ctlSubmit.Visible          = false;
                    ctlCancel.Visible          = false;
                    ctlBankLangLangFds.Visible = false;
                }
                ctlBankLangUpdatePanel.Update();
            }
        }