Пример #1
0
        public static Status CheckIpExistOrNot(IpDetails objIpDetails)
        {
            var ObjStatus = new Status();

            try
            {
                var ds = DataAccess.ExecuteDataset(Setting.GetConnectionString(), "CheckIpExist", objIpDetails.IpAddress);
                if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
                {
                    var row = ds.Tables[0].Rows[0];
                    ObjStatus.IsSuccess = Convert.ToBoolean(row["IsExist"]);
                }
            }
            catch (Exception ex)
            {
                ObjStatus.IsSuccess = false;
                ObjStatus.Message   = Setting.GeneralErrMsg;
            }
            return(ObjStatus);
        }