Example #1
0
        /// <summary>
        /// 判断角色名是否存在
        /// </summary>
        /// <param name="roleName"></param>
        /// <returns></returns>
        public static bool IsRolename(string roleName)
        {
            bool   bSeced = false;
            long   count  = 0;
            string strSql = string.Format("Select count(*) From role Where role_Name='{0}'", roleName);

            Jin.DataService.DataService dService = new Jin.DataService.DataService();

            object obj = dService.GetValue(strSql.ToString());

            if (obj != null && !string.IsNullOrEmpty(obj.ToString().Trim()))
            {
                count = Convert.ToInt32(obj.ToString().Trim());
                if (count >= 1)
                {
                    bSeced = true;
                }
                else
                {
                    bSeced = false;
                }
            }

            return(bSeced);
        }
Example #2
0
        public static long getJBBXXInfo(string Filter)
        {
            long   count  = 0;
            string strSql = string.Format("Select count(*) FROM 井漏数据 where (" + Filter + ")");

            Jin.DataService.DataService dService = new Jin.DataService.DataService();

            object obj = dService.GetValue(strSql.ToString());

            if (obj != null && !string.IsNullOrEmpty(obj.ToString().Trim()))
            {
                count = Convert.ToInt32(obj.ToString().Trim());
                return(count);
            }
            else
            {
                return(count);
            }
        }
Example #3
0
        public static long getJSInfo()
        {
            long   count  = 0;
            string strSql = string.Format("select  count(*) FROM 井效益钻速汇总");

            Jin.DataService.DataService dService = new Jin.DataService.DataService();

            object obj = dService.GetValue(strSql.ToString());

            if (obj != null && !string.IsNullOrEmpty(obj.ToString().Trim()))
            {
                count = Convert.ToInt64(obj.ToString().Trim());
                return(count);
            }
            else
            {
                return(count);
            }
        }
Example #4
0
        public static double getPJCBInfo()
        {
            double count  = 0;
            string strSql = string.Format("select AVG(单位进尺成本) FROM 井效益钻速汇总 ");

            Jin.DataService.DataService dService = new Jin.DataService.DataService();

            object obj = dService.GetValue(strSql.ToString());

            if (obj != null && !string.IsNullOrEmpty(obj.ToString().Trim()))
            {
                count = Convert.ToDouble(obj.ToString().Trim());
                return(count);
            }
            else
            {
                return(count);
            }
        }
Example #5
0
        public static long getTABLENUM(string T, string JH)
        {
            long   count  = 0;
            string strSql = string.Format("Select count(*) FROM " + T + " where 井号='" + JH + "'");

            Jin.DataService.DataService dService = new Jin.DataService.DataService();

            object obj = dService.GetValue(strSql.ToString());

            if (obj != null && !string.IsNullOrEmpty(obj.ToString().Trim()))
            {
                count = Convert.ToInt32(obj.ToString().Trim());
                return(count);
            }
            else
            {
                return(count);
            }
        }
Example #6
0
        public static Double GETXY2(string zd, string t)
        {
            Double count  = 0;
            string strSql = string.Format("Select " + zd + "  FROM 井坐标 where  井号 like '%{0}%' ", t);

            Jin.DataService.DataService dService = new Jin.DataService.DataService();

            object obj = dService.GetValue(strSql.ToString());

            if (obj != null && !string.IsNullOrEmpty(obj.ToString().Trim()))
            {
                count = Convert.ToDouble(obj.ToString().Trim());
                return(count);
            }
            else
            {
                return(count);
            }
        }
Example #7
0
        public static double getPJZSInfo(string KC)
        {
            double count  = 0;
            string strSql = string.Format("select  AVG(平均钻速) FROM 井开次效益汇总 where 开次='" + KC + "'");

            Jin.DataService.DataService dService = new Jin.DataService.DataService();

            object obj = dService.GetValue(strSql.ToString());

            if (obj != null && !string.IsNullOrEmpty(obj.ToString().Trim()))
            {
                count = Convert.ToDouble(obj.ToString().Trim());
                return(count);
            }
            else
            {
                return(count);
            }
        }
Example #8
0
        public static long getJSInfo(string KC, string Filter)
        {
            long   count  = 0;
            string strSql = string.Format("select count(*) FROM 井开次效益汇总 where 开次='" + KC + "'and " + Filter + "");

            Jin.DataService.DataService dService = new Jin.DataService.DataService();

            object obj = dService.GetValue(strSql.ToString());

            if (obj != null && !string.IsNullOrEmpty(obj.ToString().Trim()))
            {
                count = Convert.ToInt32(obj.ToString().Trim());
                return(count);
            }
            else
            {
                return(count);
            }
        }
Example #9
0
        public static long GetSBinform(string Filter)
        {
            bool   bSeced = false;
            long   count  = 0;
            string strSql = string.Format("Select count(*) FROM SB_INFOR where (" + Filter + ")");

            Jin.DataService.DataService dService = new Jin.DataService.DataService();

            object obj = dService.GetValue(strSql.ToString());

            if (obj != null && !string.IsNullOrEmpty(obj.ToString().Trim()))
            {
                count = Convert.ToInt32(obj.ToString().Trim());
                return(count);
            }
            else
            {
                return(count);
            }
        }
Example #10
0
        public static Double GETtableXYk2(string zd, double x, double Y, int K)
        {
            Double count  = 0;
            string strSql = string.Format("Select MIN( " + zd + " ) FROM 井坐标 where X<" + x + "+" + K + " AND  X>" + x + "-" + K + "  AND Y<" + Y + "+" + K + " AND Y>" + Y + "-" + K + "  ");



            Jin.DataService.DataService dService = new Jin.DataService.DataService();

            object obj = dService.GetValue(strSql.ToString());

            if (obj != null && !string.IsNullOrEmpty(obj.ToString().Trim()))
            {
                count = Convert.ToDouble(obj.ToString().Trim());
                return(count);
            }
            else
            {
                return(count);
            }
        }
Example #11
0
        /// <summary>
        /// 判断父节点是否存在角色信息中
        /// </summary>
        /// <param name="Menuid"></param>
        /// <returns></returns>
        public static bool IsPARENTID(long Menuid, long roleid)
        {
            Jin.DataService.DataService dService = new Jin.DataService.DataService();

            bool   bSeced   = false;
            long   PARENTID = Convert.ToInt32(Menuid / 10);
            long   count    = 0;
            string sql      = " select count(*) FROM ROLE_MENU b,menu c WHERE b.ROLE_ID = " + roleid + "and b.NODEID = c.NODEID and PARENTID= " + PARENTID + " ";
            object obj      = dService.GetValue(sql.ToString());

            if (obj != null && !string.IsNullOrEmpty(obj.ToString().Trim()))
            {
                count = Convert.ToInt32(obj.ToString().Trim());
                if (count >= 1)
                {
                    bSeced = true;
                }
                else
                {
                    bSeced = false;
                }
            }
            return(bSeced);
        }