public JsonResult SignUp(FormCollection form)
        {
            var svMember = new Prosoft.Common.MemberService();
            var member   = new MemberModel();
            var svSync   = new SyncService();
            var model    = new Prosoft.Common.Register();

            #region
            model.UserName = form["UserName"].Trim();
            model.Password = form["Password"].Trim();
            model.CompName = form["CompName"].Trim();

            if (string.IsNullOrEmpty(form["DisplayName"]))
            {
                model.DisplayName = model.UserName;
            }
            else
            {
                model.DisplayName = form["DisplayName"].Trim();
            }

            model.Email     = form["Email"].Trim();
            model.Phone     = form["Phone"];
            model.Mobile    = form["Mobile"];
            model.FirstName = form["FirstName"];
            model.LastName  = form["LastName"];
            model.AddrLine1 = form["AddrLine1"];

            if (!string.IsNullOrEmpty(form["DistrictID"]))
            {
                model.DistrictID = int.Parse(form["DistrictID"]);
            }

            if (!string.IsNullOrEmpty(form["ProvinceID"]))
            {
                model.ProvinceID = int.Parse(form["ProvinceID"]);
            }

            int WebID = int.Parse(form["WebID"]);

            svMember.UserSignUp(model, WebID);

            if (svMember.IsResult)
            {
                var secret = svSync.GetSecretID(model.UserName, form["password"], WebID.ToString());
                member = svSync.GetMember(secret);
            }
            #endregion

            return(Json(member));
        }
        public JsonResult SignUpWithAccount(FormCollection form)
        {
            var svMember = new Prosoft.Common.MemberService();
            var member   = new MemberModel();
            var svSync   = new SyncService();
            var model    = new Prosoft.Common.Register();

            model.UserName = form["UserName"].Trim();
            model.Password = form["Password"].Trim();
            int WebID = int.Parse(form["WebID"]);

            svMember.UserSignUpWithAccount(model, WebID);

            if (svMember.IsResult)
            {
                var secret = svSync.GetSecretID(model.UserName, form["password"], WebID.ToString());
                member = svSync.GetMember(secret);
            }

            return(Json(member));
        }