Esempio n. 1
0
        } //-----------------------------

        //this function gets a new procedure system id
        public static String GetNewSysIDProcedureInformation(CommonExchange.SysAccess userInfo)
        {
            Int32  rowCount    = 0;
            String procedureId = "";

            using (SqlCommand sqlComm = new SqlCommand())
            {
                sqlComm.Connection  = userInfo.Connection;
                sqlComm.CommandType = CommandType.StoredProcedure;
                sqlComm.CommandText = "dental.GetCountProcedureInformation";

                sqlComm.Parameters.Add("@system_user_id", SqlDbType.VarChar).Value = userInfo.UserId;

                rowCount = (Int32)sqlComm.ExecuteScalar();
            }

            do
            {
                procedureId = "SYSPRC" + ProcStatic.SixDigitZero(++rowCount);
            } while (IsExistsSysIDProcedureInformation(userInfo.UserId, userInfo.Connection, procedureId));

            return(procedureId);
        }