Esempio n. 1
0
        //Test commit
        public void Add(Users obj, string username)
        {
            long   id       = 0;
            string queryStr = "INSERT INTO";

            queryStr += " user(UserId, Pwd, LastLogin, Status, CreatedBy, CreatedDate, ModifiedBy, ModifiedDate, RoleId)";
            queryStr += " VALUES(";
            queryStr += string.Format("'{0}'", obj.UserId);
            queryStr += string.Format(", '{0}'", obj.Pwd);
            queryStr += string.Format(", '{0}'", obj.LastLogin);
            queryStr += string.Format(", '{0}'", obj.Status);
            queryStr += string.Format(", '{0}'", obj.CreatedBy);
            queryStr += ", NOW()";
            queryStr += string.Format(", '{0}'", obj.ModifiedBy);
            queryStr += ", NOW()";
            queryStr += string.Format(", '{0})'", obj.RoleId);
            //PosService.DataExecute(Username, Password, queryStr, ref errorString);
            PosService.DataExecuteId(Username, Password, queryStr, ref id, ref errorString);
            //MessageBox.Show(id + "");
        }