コード例 #1
0
 private void GetFocusedRowData(int index)
 {
     if (index >= 0 && CustomerView.RowCount > 0)
     {
         CustomerView.FocusedRowHandle = index;
         btnSave.Enabled   = false;
         btnAddNew.Enabled = btnModify.Enabled = btnDelete.Enabled = true;
         txtCustCode.Text  = CustomerView.GetRowCellValue(index, CustomerManager.CustomerDetails.CustomerCode.ToString()).ToString();
         Customer c = Customer.Get(int.Parse(txtCustCode.Text));
         txtCustName.Text    = c.Customer_Name;
         txtAddress.Text     = c.Address;
         City.EditValue      = c.City_Code;
         txtMobile1.Text     = c.Mobile1;
         txtMobile2.Text     = c.Mobile2;
         txtEmail.Text       = c.EMail;
         txtFaceBook.Text    = c.FaceBook;
         spCreditLimit.Value = c.CreditLimit == null ? 0 : (decimal)c.CreditLimit;
         Group.EditValue     = c.GroupCode;
         txtNotes.Text       = c.Notes;
     }
 }