protected void txtCode_TextChanged(object sender, EventArgs e)
{ GridViewRow currentRow =(GridViewRow)((TextBox)sender).Parent.Parent;
TextBox txt = (TextBox)currentRow.FindControl("txtCode");
TextBox txtfine = (TextBox)currentRow.FindControl("txtFine");
Int32 count =Convert.ToInt32( txt.Text);
var chkradio = rblQualification.SelectedValue;
byte chkRadio = SafeConvert.ToByte(chkradio);
var vehiclecategory = _service.GetAllVehicleCategory().Where(x => x.ID == chkRadio).FirstOrDefault();
var vehicletype = vehiclecategory.VehicleType_Id;
var pntytype = _service.GetAllVehiclePenaltyType().Where(x => x.ID == SafeConvert.ToByte(count)).Count();
var plntyfee = _service.GetAllVehiclePenaltiesFee().Where(x => x.VehicleTypeID == vehicletype && x.VehiclePenaltyTypeID == vehicletype).FirstOrDefault(); txtfine.Text = plntyfee.Fee.ToString(); }