コード例 #1
0
 protected void gvwMaster_RowCommand(object sender, GridViewCommandEventArgs e)
 {
     if (e.CommandName == "EditRow")
     {
         int id = Convert.ToInt32(e.CommandArgument);
         RowID = id;
         mvwForm.SetActiveView(viwAddEdit);
         BillingType billingType = billingTypeProvider.Get(id);
         txtDescription.Text = billingType.Description;
         txtAutoPayDay.Text  = RowID > 1 ? billingType.AutoPayDay.ToString() : "N/A";
         chkIsActive.Checked = billingType.IsActive;
         txtDescription.Focus();
         btnSave.Enabled = RowID > 1;
     }
 }