예제 #1
0
        public static int AddDownloadLog(string ProjectText, string mUser, string FTPPath)
        {
            List <MySqlParameter> list = new List <MySqlParameter>();
            string sql = "insert  into sys_download_log  set ";

            list.Add(new MySqlParameter("project", ProjectText));
            list.Add(new MySqlParameter("name", FTPPath));
            list.Add(new MySqlParameter("user", mUser));
            string sql2 = "project=@project,  name=@name , user=@user";

            sql += sql2;
            //  LogHelper.Log("sql: " + sql);
            return(MKMySqlHelper.SqlEx(list, sql));
        }
예제 #2
0
        //public static int UserSave(string text1, string text2, string text3, string cbfunctionText)
        //{
        //    List<RePare> list = new List<RePare>();

        //    list.Add(new RePare("Function", cbfunctionText, true));
        //    list.Add(new RePare("Team", text3, true));
        //    list.Add(new RePare("passwd", text2, true));
        //    list.Add(new RePare("name", text1, false));
        //    list.Add(new RePare("perminission", "0", false));
        //    string wherestr = " where  name ='" + text1 + "'";
        //    return ReplaceWork("Users", list, wherestr);
        //}



        public static int AddItem(string sheetname, List <SQLDataInfo> mdataList)
        {
            // LogHelper.Log(item + " " + md5 + " " + mdataList.Count + " " + fileSizeK);
            List <MySqlParameter> list = new List <MySqlParameter>();
            string sql  = "insert  into " + sheetname + " set ";
            string sql2 = "";

            foreach (SQLDataInfo item in mdataList)
            {
                if (sql2 != "")
                {
                    sql2 += " , ";
                }
                sql2 += item.name + "=@" + item.name + " ";
                list.Add(new MySqlParameter(item.name, item.value.Trim()));
            }
            sql += sql2;
            return(MKMySqlHelper.SqlEx(list, sql));
        }
예제 #3
0
        public static int AddItem(string SqlSheet, string item, string md5, List <SQLDataInfo> mdataList, int fileSizeK)
        {
            LogHelper.Log(item + " " + md5 + " " + mdataList.Count + " " + fileSizeK);
            List <MySqlParameter> list = new List <MySqlParameter>();
            string sql  = "insert  into " + SqlSheet + " set ";
            string sql2 = " ItemName=@ItemName ";

            foreach (SQLDataInfo item1 in mdataList)
            {
                sql2 += " , " + item1.name + "=@" + item1.name + " ";
                list.Add(new MySqlParameter(item1.name, item1.value.Trim()));
            }
            list.Add(new MySqlParameter("ItemName", item));
            string[] xx = item.Split('.');
            list.Add(new MySqlParameter("FileType", xx[xx.Length - 1]));
            list.Add(new MySqlParameter("FileSizeK", fileSizeK));
            list.Add(new MySqlParameter("MD5", md5));
            sql2 += " , FileType=@FileType , FileSizeK=@FileSizeK,MD5=@MD5";
            sql  += sql2;



            return(MKMySqlHelper.SqlEx(list, sql));
        }