public ActionResult BasicInfo(FormCollection collection)
        {
            Dictionary<string, string> sitemaster = GetSiteMaster();
            ViewData["SiteMaster"] = sitemaster;
            int userid=Int32.Parse(CurrentUserInfo.UserID);
            //int companyID = new MemberUserInfoDao().GetMemberID(userid);
            string username=CurrentUserInfo.UserName;
            IDictionary dict = QueryBasicInfo(userid);
            if (dict != null)
            {
                string mail = MembershipService.GetUserMail(username);
                if (CurrentUserInfo != null)
                {
                    if (collection.Count == 0)
                    {
                        //ViewData["CompanyID"] = dict["MemberID"];
                        ViewData["Name"] = username;
                        dict["Email"] = mail;
                        ViewData["BasicInfo"] = dict;

                    }
                    else
                    {
                        //Dictionary<string, string> dict = new Dictionary<string, string>();
                        //dict["OldPassword"] = collection["OldPassword"];
                        //dict["NewPassword"] = collection["NewPassword"];
                        dict["ContractName"] = collection["ContractName"];
                        dict["Address"] = collection["Address"];
                        dict["Email"] = collection["Email"];
                        dict["ContractMobile"] = collection["ContractMobile"];
                        dict["Name"] = collection["Name"];
                        dict["Mobile"] = collection["Mobile"];
                        if (!MembershipService.CheckValidateCode(collection["ValidateCode"]))
                        {
                            //ViewData["CompanyID"] = companyID;
                            ViewData["Name"] = username;
                            ViewData["BasicInfo"] = dict;
                            ViewData["Validatecode"] = "False";
                            return View();
                        }
                        bool isSuccess = true;
                        EnterpriseMemberInfo upadtedEMI = new EnterpriseMemberInfo();
                        upadtedEMI = new EnterpriseMemberInfoDao().Find(Int32.Parse(dict["MemberID"].ToString()));
                        upadtedEMI.Address = collection["Address"];
                        upadtedEMI.ContractName = collection["ContractName"];
                        upadtedEMI.ContractMobile = collection["ContractMobile"];
                        MemberUserInfo mui = new MemberUserInfo();
                        Hashtable ht = new Hashtable();
                        ht["Mobile"] = collection["Mobile"];
                        ht["Name"] = collection["Name"];
                        ht["Userid"] = userid;
                        try
                        {
                            new EnterpriseMemberInfoDao().Update(upadtedEMI);
                            MembershipService.UpdateMail(userid, collection["Email"]);
                            CRMMapper.Get().Update("MemberUserInfo.myupdate", ht);
                        }
                        catch (Exception)
                        {
                            isSuccess = false;
                        }
                        //ViewData["CompanyID"] = companyID;
                        ViewData["Name"] = username;
                        ViewData["Basicinfo"] = dict;
                        ViewData["Success"] = isSuccess;
                    }
                }
            }
            else
            {
                UserModel um = new MembershipUserService().GetUserName(userid);
                IDictionary dictex = new Dictionary<string, string>();
                if (collection.Count == 0)
                {
                    dictex.Add("Address", um.Address);
                    dictex.Add("ContractMobile", um.Mobile);
                    dictex.Add("Mobile", um.Mobile);
                    dictex.Add("Email", um.Email);
                    ViewData["Name"] = username;
                    ViewData["BasicInfo"] = dictex;
                }
                else
                {
                    dictex.Add("Address", collection["Address"]);
                    dictex.Add("ContractMobile", collection["ContractMobile"]);
                    dictex.Add("Mobile", collection["Mobile"]);
                    dictex.Add("Email", collection["Email"]);
                    ViewData["Name"] = username;
                    ViewData["BasicInfo"] = dictex;
                    if (!MembershipService.CheckValidateCode(collection["ValidateCode"]))
                    {
                        //ViewData["CompanyID"] = companyID;
                        ViewData["Validatecode"] = "False";
                        return View();
                    }
                    bool isSuccess = true;
                    Hashtable ht = new Hashtable();
                    ht["Mobile"] = collection["Mobile"];
                    ht["Name"] = collection["Name"];
                    ht["Address"] = collection["Address"];
                    ht["Email"] = collection["Email"];
                    ht["Userid"] = userid;
                    try
                    {
                        MembershipService.UpdateBaseInfo(ht);
                    }
                    catch (Exception)
                    {
                        isSuccess = false;
                    }
                    //ViewData["CompanyID"] = companyID;
                    ViewData["Success"] = isSuccess;
                }
            }
            ViewData["titlename"] = "基本资料修改";
            return View();
        }
 public JsonResult SaveScene(string userid, string URL, string Detail, string Name, string Desc, string ProjectID, string MedicineCode)
 {
     Hashtable htparm = new Hashtable();
     htparm["Name"] = Name;
     htparm["Desc"] = Desc;
     htparm["Detail"] = Detail;
     htparm["ProjectID"] = ProjectID;
     htparm["MedicineCode"] = MedicineCode;
     int uid = Int32.Parse(userid);
     int memberid = new MemberUserInfoDao().Find(uid).MemberID;
     string eName = new EnterpriseMemberInfoDao().Find(memberid).EnterpriseName;
     htparm["eid"] = new EnterpriseCodeDao().FindByEnterprise(eName).Single().ID;
     try
     {
         if (URL.IndexOf("SceneNo") > 0)
         {
             int start = URL.IndexOf("SceneNo") + 7;
             htparm["SceneNo"] = Int32.Parse(URL.Substring(start, URL.Length - start));
             htparm["URL"] = URL + "/" + htparm["SceneNo"];
             EmedEvaluationProjectMapper.Get().Update("Scene.myupdate", htparm);
         }
         else
         {
             htparm["SceneNo"] = EmedEvaluationProjectMapper.Get().QueryForObject<int>("Scene.GetMaxNo", "") + 1;
             htparm["URL"] = URL + "/" + htparm["SceneNo"];
             EmedEvaluationProjectMapper.Get().Insert("Scene.myinsert", htparm);
         }
     }
     catch (Exception e)
     {
         return Json("保存失败");
     }
     return Json("保存成功");
 }
        /// <summary>
        /// 得到当前企业的关键名称
        /// </summary>
        /// <returns></returns>
        public string GetKeyPointName()
        {
            EnterpriseMemberInfoDao mDao=new EnterpriseMemberInfoDao();

            return mDao.GetKeyName(EnterPriseMemberInfo.MemberID);
        }