Esempio n. 1
0
        public int GetMax_ID_SingleMeterial()
        {
            common_DataBase = new Common_DataBase();
            common_DataBase.Query = "SELECT MAX(SID) FROM SingleMeterial";

            string strTemp = common_DataBase.ExecuteScalar_Text();
            if(strTemp == "")
            {
                strTemp = "0";
            }
            return int.Parse(strTemp) + 1;
        }
Esempio n. 2
0
        /// <summary>
        /// �̹� �ߺ��Ǵ� �̸��� �ִ��� Ȯ��
        /// </summary>
        /// <param name="strName"></param>
        /// <returns></returns>
        public int ISNameSame(string strName)
        {
            common_DataBase = new Common_DataBase();
            common_DataBase.Query = String.Format("SELECT COUNT(*) FROM SingleMeterial Where Name = '{0}'",strName);

            return int.Parse(common_DataBase.ExecuteScalar_Text());
        }
Esempio n. 3
0
        public int GetMax_ID_LayerDetail()
        {
            common_DataBase = new Common_DataBase();
            common_DataBase.Query = "SELECT MAX(DID) FROM LayerDetail";

            string strTemp = common_DataBase.ExecuteScalar_Text();
            if(strTemp == "")
            {
                strTemp = "0";
            }
            return int.Parse(strTemp) + 1;
        }
Esempio n. 4
0
        /// <summary>
        /// �̹� ���� �̸��� �����ϴ��� üũ�Ѵ� (������ true)
        /// </summary>
        /// <param name="bIsSingle">Single �� true</param>
        /// <param name="strName">Name</param>
        /// <returns></returns>
        public bool IsExist(bool bIsSingle,string strName)
        {
            common_DataBase = new Common_DataBase();
            if(bIsSingle == true)
            {
                common_DataBase.Query = String.Format("SELECT COUNT(*) FROM view_SingleGraphInfo Where Name = '{0}'",strName);
            }
            else
            {
                common_DataBase.Query = String.Format("SELECT COUNT(*) FROM view_MultiLayerMaterialGraph Where SingleMeterial.Name = '{0}'",strName);
            }
            int dCount = int.Parse(common_DataBase.ExecuteScalar_Text());

            if(dCount > 0)
            {
                return true;
            }
            else
            {
                return false;
            }
        }
Esempio n. 5
0
        public int GetMax_ID_MultiLayerMaterialGraph()
        {
            common_DataBase = new Common_DataBase();
            common_DataBase.Query = "SELECT MAX(LGID) FROM MultiLayerMaterialGraph";

            string strTemp = common_DataBase.ExecuteScalar_Text();
            if(strTemp == "")
            {
                strTemp = "0";
            }
            return int.Parse(strTemp) + 1;
        }
Esempio n. 6
0
        public int PassWordCheck(string strPass)
        {
            common_DataBase = new Common_DataBase();
            common_DataBase.Query = String.Format("SELECT COUNT(*) FROM tblPass Where Pass = '******'",strPass);

            return int.Parse(common_DataBase.ExecuteScalar_Text());
        }