예제 #1
0
        protected void ctlMaintain_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            int rowIndex;

            if (e.CommandName.Equals("MaintainRate"))
            {
                ctlDatePicker.Value       = DateTime.Now;
                rowIndex                  = ((GridViewRow)((LinkButton)e.CommandSource).NamingContainer).RowIndex;
                ctlMaintain.SelectedIndex = rowIndex;
                PBID = UIHelper.ParseShort(ctlMaintain.DataKeys[rowIndex].Values["Pbid"].ToString());
                DbPb = ScgDbQueryProvider.DbPBQuery.FindByIdentity(PBID);
                if (DbPb != null && DbPb.MainCurrencyID != null)
                {
                    CurrencyDropdown1.BindCurrency(DbPb.MainCurrencyID.Value);
                    CurrencyDropdown1.Enable = false;
                }
                else
                {
                    CurrencyDropdown1.ResetControl();
                    CurrencyDropdown1.Enable = true;
                }
                ctlDivMaintainInfo.Style["display"] = "block";
                ctlMaintainInfo.DataCountAndBind();
            }
            ctlUpdatePanelMaintainRateGrid.Update();
        }
예제 #2
0
 public void ClearField()
 {
     ctlDatePicker.Value = DateTime.Now;
     if (DbPb != null && DbPb.MainCurrencyID == null)
     {
         CurrencyDropdown1.ResetControl();
     }
     CurrencyDropdown2.ResetControl();
     ctlFromAmountTextBox.Text   = "";
     ctlExchangeRateTextbox.Text = "";
     ctlToAmountTextBox.Text     = "";
 }