示例#1
0
        //////CheckNoaccceptInform

        public static bool CheckNoaccceptInform()
        {
            string cString = Connectstring;



            string selAllString = "select * from ly_inform_record  where  DATEDIFF ( minute , informtime , getdate() )>(select top 1 informwaitingtime from T_syspar) and isnull(acceptflag,0) =0 and informcontent = '" + SQLDatabase.nowUserName() + "'";


            SqlDataAdapter nowAdapter = new SqlDataAdapter(selAllString, cString);

            DataSet nowData = new DataSet();

            nowAdapter.Fill(nowData);

            if (nowData.Tables[0].Rows.Count > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
示例#2
0
        public static void drawingChangeREC(string itemno, int safe_level, string change_style, string memory_rec)
        {
            SqlConnection sqlConnection1 = new SqlConnection(Connectstring);
            SqlCommand    cmd            = new SqlCommand();



            cmd.CommandText = " INSERT INTO ly_drawing_record (itemno ,safe_level,change_style ,memory_rec,UserID ,Username,MachineName,Machinecode ) " +
                              " VALUES ( '" + itemno + "' ," + safe_level + " ,'" + change_style + "' ,'" + SQLDatabase.Nowmemory_rec + "','" + SQLDatabase.nowUserID + "','" + SQLDatabase.nowUserName() + "','" + SQLDatabase.nowMachineName() + "','" + SQLDatabase.nowMachinecode() + "')";



            cmd.CommandType = CommandType.Text;
            cmd.Connection  = sqlConnection1;

            sqlConnection1.Open();
            cmd.ExecuteNonQuery();
            sqlConnection1.Close();
        }