Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
        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);
        }
Ejemplo n.º 4
0
        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);
        }