LLBLGen 3.0
.Net Framework 2.0
Oracle 9i
Hello Support,
In my code below,
accountnature.Description = ClubCentricBISpecific.ChangeCase.ToTitleCase(tbxdescription.Text.Trim()); is a mandatory field in database. I am just trying to return error message that data is not saved when user has entered this field. Example
#region Fileds mapped between database tablename.columnname and GUI
accountnature.Description = ClubCentricBISpecific.ChangeCase.ToTitleCase(tbxdescription.Text.Trim());
accountnature.Createddate = ClubCentricBISpecific.ServerDateTime.getcurrentserverdatewithtime();
accountnature.CreateduserId = ClubCentricBISpecific.StandardMessage.loginuserid;
#endregion
#region Insert Data
bool succeeded = adapteraccountnature.SaveEntity(accountnature, true);
if (succeeded)
{
message = ClubCentricBISpecific.StandardMessage.datasavesuccess; // Get message if data is saved successfully
MessageBox.Show(message); // Display Message
adapteraccountnature.CloseConnection();
DoRefresh(); //call
}
else
{
message = ClubCentricBISpecific.StandardMessage.datasavefailure; // Get message if data is not saved
adapteraccountnature.CloseConnection();
MessageBox.Show(message); // Display Message
}
#endregion
But the code halts at bool succeeded = adapteraccountnature.SaveEntity(accountnature, true);
My question is why is it not going to else part ? since saveentity becomes false