public bool Insert(object obj) { bool blnResult = false; try { strvalidationResult = ValidationEntry(obj); if (strvalidationResult.Count() == 0) { COM.HelperMethod.SetValueInObject(obj, Guid.NewGuid(), "DeviceId"); if (objDAL.Insert(obj)) { blnResult = true; } } else { throw new Exception(string.Join("<br />", strvalidationResult)); } } catch (Exception) { throw; } return(blnResult); }
public bool Insert(object obj) { bool blnResult = false; try { strvalidationResult = ValidationEntry(obj); if (strvalidationResult.Count() == 0) { Entity = (ENT.CityMasterSUB)obj; COM.HelperMethod.SetValueInObject(obj, Guid.NewGuid(), "CityID"); COM.HelperMethod.SetValueInObject(obj, Entity.StateID, "StateID"); if (objDAL.Insert(obj)) { blnResult = true; } } else { throw new Exception(string.Join("<br />", strvalidationResult)); } } catch (Exception) { throw; } return(blnResult); }
public bool Insert(object obj) { bool blnResult = false; try { COM.HelperMethod.SetValueInObject(obj, Guid.NewGuid(), "MessageLogId"); if (objDAL.Insert(obj)) { blnResult = true; } } catch (Exception) { throw; } return(blnResult); }
public bool Insert(object obj) { bool blnResult = false; try { if (obj != null) { COM.HelperMethod.SetValueInObject(obj, Guid.NewGuid(), "otp_id"); if (objDAL.Insert(obj)) { blnResult = true; } } else { throw new Exception(); } } catch (Exception) { throw; } return(blnResult); }