Exemplo n.º 1
0
        public CommandResult UserRegister(LoginUser user)
        {
            var parameters = new[] {
                new SqlParameter("@username", user.UserName),
                new SqlParameter("@psw", DESEncrypt.Encrypt(user.Password)),
                new SqlParameter("@cname", user.CName),
                new SqlParameter("@caddr", user.CAddr),
                new SqlParameter("@industorytype", user.IndustoryType),
                new SqlParameter("@csellphone", user.SellPhone),
                new SqlParameter("@cLicense", "")
                // new SqlParameter("@cLicense",astatic.GenFile(user.CName, DateTime.Now.AddMonths(1).ToShortDateString()))
            };

            CommandResult res = new CommandResult();

            res.IntResult = 0;
            DataSet ds = null;

            try
            {
                ds = DataProvider.ExecuteDataSet("usp_UserRegister", parameters);
                DataRow dr = ds.Tables[0].Rows[0];
                res.IntResult = Convert.ToInt32(dr[0]);
                res.Message   = dr[1].ToString();
            }
            finally
            {
                ds.Dispose();
            }

            return(res);
        }
Exemplo n.º 2
0
        public NavigatorMeta GetNavigator(int appId)
        {
            var     nm  = new NavigatorMeta();
            string  sql = string.Format("exec [usp_GetNavigateMeta] {0}, {1}", appId, Account.User.UserID);
            DataSet ds  = DataProvider.ExecuteDataSet(sql);

            nm.Nodes.AddRange(DataProvider.LoadData <EAP_Navigator_Node>(ds.Tables[0]));
            nm.Asso.AddRange(DataProvider.LoadData <EAP_Navigator_Asso>(ds.Tables[1]));
            return(nm);
        }