Пример #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         AdminMgr.BindZoneControl(HttpContext.Current, ddlZone, this.User.Identity.Name, true);
     }
 }
Пример #2
0
        void BindData()
        {
            var accountData = Master.GetAccount();

            if (accountData == null)
            {
                Master.ShowMessage("请先选择经理.");
                return;
            }

            ClearData();
            var matchList = NbManagerhonorMgr.GetByManager(accountData.ManagerId, accountData.ZoneId);

            if (matchList == null)
            {
                Master.ShowMessage("没有荣誉数据.");
                return;
            }
            var localList = new List <AdminManagerhonorEntity>(matchList.Count);

            foreach (var entity in matchList)
            {
                var aEntity = new AdminManagerhonorEntity(entity);
                aEntity.MatchTypeV = AdminMgr.GetEnumName("EnumMatchType", entity.MatchType);
                localList.Add(aEntity);
            }
            lblHint.Text         = "总荣誉数:" + localList.Count;
            datagrid1.DataSource = localList;
            datagrid1.DataBind();
        }
Пример #3
0
        void BindData()
        {
            try
            {
                var zone      = AdminMgr.GetSelectZoneIdInt(HttpContext.Current, ddlZone);
                var startTime = DateTime.Today.AddDays(-15);
                var endTime   = DateTime.Today;
                var list      = StatisticKpiMgr.GetbyDate(zone, startTime, endTime);
                for (int i = 0; i < list.Count; i++)
                {
                    list[i].RetentionPercent2  = list[i].Retention2.ToString() + "  " + GetPercent(list[i].Retention2, i, list);
                    list[i].RetentionPercent3  = list[i].Retention3.ToString() + "  " + GetPercent(list[i].Retention3, i, list);
                    list[i].RetentionPercent4  = list[i].Retention4.ToString() + "  " + GetPercent(list[i].Retention4, i, list);
                    list[i].RetentionPercent5  = list[i].Retention5.ToString() + "  " + GetPercent(list[i].Retention5, i, list);
                    list[i].RetentionPercent6  = list[i].Retention6.ToString() + "  " + GetPercent(list[i].Retention6, i, list);
                    list[i].RetentionPercent7  = list[i].Retention7.ToString() + "  " + GetPercent(list[i].Retention7, i, list);
                    list[i].RetentionPercent15 = list[i].Retention15.ToString() + "  " + GetPercent(list[i].Retention7, i, list);
                    list[i].RetentionPercent30 = list[i].Retention30.ToString() + "  " + GetPercent(list[i].Retention7, i, list);
                }
                datagrid2.DataSource = list;

                datagrid2.DataBind();
                lblInviteNumber.Text = FriendinviteMgr.GetAllNumber(ddlZone.SelectedValue).ToString();
            }
            catch (Exception ex)
            {
                LogHelper.Insert(ex);
            }
        }
Пример #4
0
        protected void btnSearch_Click(object sender, EventArgs e)
        {
            try
            {
                datagridzone.DataSource = null;
                datagrid1.DataSource    = null;
                datagrid2.DataSource    = null;
                var sitename = AdminMgr.GetSelectZoneId(HttpContext.Current, ddlZone);
                if (sitename == "0")
                {
                    ltlMessage.Text = "暂不支持所有区查询";
                    return;
                }

                var dyStrengthUsers   = ActivityDyMgr.GetManagerIdDyStrength(sitename);
                var dyLadderRankUsers = ActivityDyMgr.GetDyLadderRank(sitename);
                var dyPowerRankUser   = ActivityDyMgr.GetDyPowerRank(sitename);
                //Dictionary<string, List<ActivityDyUserEntity>> zoneUsers =
                //    new Dictionary<string, List<ActivityDyUserEntity>>();
                //if (dyStrengthUsers.Count > 0)
                //{
                //    foreach (var entity in dyStrengthUsers)
                //    {
                //        if (!zoneUsers.ContainsKey(entity.ZoneId))
                //            zoneUsers.Add(entity.ZoneId, new List<ActivityDyUserEntity>());
                //        zoneUsers[entity.ZoneId].Add(entity);

                //    }
                //}
                //foreach (var entity in zoneUsers)
                //{
                //    for (int i = 0; i < entity.Value.Count; i++)
                //    {
                //        CreateActivityDyUserStrength(entity.Key, entity.Value[i]);
                //        var adEntity = ActivitystatisticsDouyuMgr.GetById(entity.Value[i].ManagerId);
                //        UpdateActivitystatisticsDouyuEntity(entity.Value[i], adEntity);
                //    }
                //}

                //for (int i = 0; i < dyStrengthUsers.Count; i++)
                //{
                //    CreateActivityDyUserStrength(dyStrengthUsers[i].ZoneId, dyStrengthUsers[i]);
                //    var adEntity = ActivitystatisticsDouyuMgr.GetById(dyStrengthUsers[i].ManagerId);
                //    UpdateActivitystatisticsDouyuEntity(dyStrengthUsers[i], adEntity);
                //}

                datagridzone.DataSource = dyStrengthUsers;
                datagrid1.DataSource    = dyLadderRankUsers;
                datagrid2.DataSource    = dyPowerRankUser;
                datagridzone.DataBind();
                datagrid1.DataBind();
                datagrid2.DataBind();
                ltlMessage.Text = "";
            }
            catch (Exception ex)
            {
                LogHelper.Insert(ex);
                ShowMessage(ex.Message);
            }
        }
Пример #5
0
        protected void btnLadderPrize_Click(object sender, EventArgs e)
        {
            try
            {
                var zone      = AdminMgr.GetSelectZoneId(HttpContext.Current, ddlZone);
                var curSeason = ConvertHelper.ConvertToInt(txtLadderSeason.Text);
                if (curSeason <= 0)
                {
                    ShowMessage("天梯赛季不能小于1");
                    return;
                }
                ShowMessage("天梯发奖开始...");
                var managers = LadderManagerhistoryMgr.GetPrizeManager(curSeason, zone);
                if (managers != null)
                {
                    List <MailBuilder> mails = new List <MailBuilder>(managers.Count);
                    foreach (var manager in managers)
                    {
                        LadderThread.Instance.SendPrize(manager, 0, ref mails);
                    }

                    var mailDataTable = MailCore.BuildMailBulkTable(mails);
                    LadderSqlHelper.SaveManagerPrize(managers, mailDataTable, zone);
                }
                ShowMessage("天梯发奖成功。");
            }
            catch (Exception ex)
            {
                LogHelper.Insert(ex);
                ShowMessage("local exception:" + ex.Message);
            }
        }
Пример #6
0
        void BindData()
        {
            var accountData = Master.GetAccount();

            if (accountData == null)
            {
                Master.ShowMessage("请先选择经理.");
                return;
            }
            ClearData();
            var matchList = NbMatchstatMgr.GetByManager(accountData.ManagerId, accountData.ZoneId);

            if (matchList == null)
            {
                Master.ShowMessage("没有比赛数据.");
                return;
            }
            var localList = new List <AdminMatchStatEntity>(matchList.Count);

            foreach (var entity in matchList)
            {
                var aEntity = new AdminMatchStatEntity(entity);
                aEntity.MatchTypeV = AdminMgr.GetEnumName("EnumMatchType", entity.MatchType);
                localList.Add(aEntity);
            }

            lblHint.Text         = string.Format("总场次:{0}", matchList.Sum(d => d.TotalCount));
            datagrid1.DataSource = localList;
            datagrid1.DataBind();
        }
Пример #7
0
        protected void AdminLogin_Click(object sender, EventArgs e)
        {
            string     adminAccount  = this.loginAccount.Value.Trim();
            string     adminPwd      = this.loginPwd.Value.Trim();
            MD5Encrypt MD5           = new MD5Encrypt();
            string     adminPassword = MD5.GetMD5(adminPwd);

            if (Session["CheckCode"] != null)
            {
                //这样写可以不能区分大小写
                if (Session["CheckCode"].ToString().ToUpper() == this.txtVerify.Value.Trim().ToString().ToUpper())
                {
                    AdminMgr mgr = new AdminMgr();
                    ExamSignSystemEntity.Admin admin = mgr.Login(adminAccount, adminPassword);
                    if (admin != null)
                    {
                        // 把当前用户保存下来
                        ContextObjects.CurrentAdmin = admin;
                        Response.Redirect("../Main/Operate.aspx", true);
                    }
                    else
                    {
                        string sp = "账号或密码错误";
                        this.hint.InnerHtml  = sp;
                        this.txtVerify.Value = "";
                    }
                }
                else
                {
                    this.hint.InnerHtml  = "验证码错误";
                    this.txtVerify.Value = "";
                }
            }
        }
Пример #8
0
    protected void btnOK_Click(object sender, EventArgs e)
    {
        AdminMgr sMgr  = new AdminMgr();
        Admin    admin = new Admin();

        if (this.txtAdminID.ReadOnly == false)
        {
            if (sMgr.ExistsAdmin(this.txtAdminID.Text))
            {
                this.SendMessage("该登录名称已经存在");
                return;
            }
            admin.Password = "******";
        }
        else
        {
            admin = sMgr.GetAdmin(this.txtAdminID.Text);
        }

        admin.AdminID   = this.txtAdminID.Text.Trim();
        admin.AdminName = this.txtAdminName.Text.Trim();
        if (this.txtPassword.Text != "")
        {
            admin.Password = this.txtPassword.Text;
        }



        sMgr.UpdateAdmin(admin);
        this.SendMessage("信息编辑成功");
        if (!this.txtAdminID.ReadOnly)
        {
            this.ClearTextData(this);
        }
    }
Пример #9
0
    protected void dgList_DeleteCommand(object source, DataGridCommandEventArgs e)
    {
        AdminMgr sMgr = new AdminMgr();

        sMgr.DelAdmin(e.Item.Cells[0].Text);
        this.initForm();
    }
Пример #10
0
        public string CdsListT(string disease_name, string disease_position, string symptoms, string page = "1")
        {
            string    Count = String.Empty;
            DataTable list  = AdminMgr.QueryCdsList(disease_name, disease_position, symptoms, Convert.ToInt32(page), out Count);

            return(CommonFunctions.DataTableToJsonWithJavaScriptSerializer(list, Count));
        }
Пример #11
0
        protected void btnSendItem_Click(object sender, EventArgs e)
        {
            try
            { if (CheckManager())
              {
                  var itemCode = ConvertHelper.ConvertToInt(txtItemCode.Text);
                  if (itemCode <= 0)
                  {
                      ShowMessage("物品编码不对");
                      return;
                  }
                  var count = ConvertHelper.ConvertToInt(txtItemCount.Text);
                  if (count > 10)
                  {
                      ShowMessage("一次发送不能超过10个");
                      return;
                  }
                  var strength  = ConvertHelper.ConvertToInt(txtItemStrength.Text);
                  var isBinding = chkBinding.Checked;

                  var code = AdminMgr.AddItems(_account.ZoneId, _account.ManagerId, itemCode, count, strength, isBinding, false);
                  if (code == 0)
                  {
                      SaveAdminLog(EnumAdminOperationType.SendItem, string.Format("ItemCode:{0},Count:{1},Strength:{2}", itemCode, count, strength));
                  }
                  ShowMessage("添加物品返回:" + code);
              }
            }
            catch (Exception ex)
            {
                LogHelper.Insert(ex);
                ShowMessage(ex.Message);
            }
        }
Пример #12
0
        //页面加载
        public string  LiveListT(string Title, string Speaker, string Section, string Publisher, string Channel, string Date_t, string page = "1")
        {
            string    Count = String.Empty;
            DataTable list  = AdminMgr.QueryLiveList(Title, Speaker, Section, Publisher, Channel, Date_t, Convert.ToInt32(page), out Count);

            return(CommonFunctions.DataTableToJsonWithJavaScriptSerializer(list, Count));
        }
Пример #13
0
        public string VodListT(string title, string Proposer, string Grade, string Unit, string Section, string Date_t, string page = "1")
        {
            string Count = String.Empty;
            var    list  = AdminMgr.QueryVodList(title, Proposer, Grade, Unit, Section, Date_t, Convert.ToInt32(page), out Count);

            return(CommonFunctions.DataTableToJsonWithJavaScriptSerializer(list, Count));
        }
Пример #14
0
        public ActionResult CaseListTable(string Title, string Proposer, GenderType Sex, PatientCaseStatusType?status, string DateT, int page)
        {
            string Count = String.Empty;
            var    list  = AdminMgr.QueryCaseList(Title, Proposer, Sex, status, DateT, page, out Count);

            ViewBag.Count = Count;
            return(PartialView("CaseListTable", list));
        }
Пример #15
0
        // 查询文章列表
        public ActionResult SearchIndex(string T_title, string H_page, string T_commit, string T_writer, string S_stutes, string T_Datetime)
        {
            string Count = string.Empty;
            var    list  = AdminMgr.QueryArticleListViewbyConditions(T_title, Convert.ToInt32(H_page), T_commit, T_writer, S_stutes, out Count, T_Datetime);

            ViewBag.Count = Count;
            return(View("Index", list));
        }
Пример #16
0
        public ActionResult Index()
        {
            string Count = string.Empty;
            var    list  = AdminMgr.QueryArticleListViewbyConditions("", 1, "", "", "00", out Count, "00");

            ViewBag.Count = Count;
            return(View(list));
        }
Пример #17
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         AdminMgr.BindZoneControl(HttpContext.Current, ddlZone, this.User.Identity.Name);
         AdminMgr.BindDdlControl(ddlCacheType, "EnumCacheType");
     }
 }
Пример #18
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         //StatisticThread.Instance.GetKpi(DateTime.Now,DateTime.Now);
         AdminMgr.BindZoneControl(HttpContext.Current, ddlZone, this.User.Identity.Name);
     }
 }
Пример #19
0
        public ActionResult CaseList(string Title, string Proposer, PatientCaseStatusType?status, string DateT, string page)
        {
            string Count = String.Empty;
            var    list  = AdminMgr.QueryCaseList(Title, Proposer, GenderType.全部, status, DateT, 1, out Count);

            ViewBag.Count = Count;
            return(View(list));
        }
Пример #20
0
        public string NewsListT(string Title, string AuthorName, string AuthorOrg, string Post_Name, string Post_Dt, string Page = "1")
        {
            string    Count = String.Empty;
            DataTable list  = AdminMgr.QueryNewsList(Title, AuthorName, AuthorOrg, Post_Name, Post_Dt, Convert.ToInt32(Page),
                                                     out Count);

            return(CommonFunctions.DataTableToJsonWithJavaScriptSerializer(list, Count));
        }
Пример #21
0
        public ActionResult UserListtable(string name = null, string mobile = null, string hosp = null, string dept = null, UserStatusType?status = null, QueryDateRangeType range = QueryDateRangeType.全部, string page = "1")
        {
            string Count = String.Empty;
            var    list  = AdminMgr.QueryUsers(name, mobile, hosp, dept, status, range, Convert.ToInt32(page), out Count);

            ViewBag.Count = Count;
            return(PartialView("UserListtable", list));
        }
Пример #22
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         AdminMgr.BindZoneControl(HttpContext.Current, ddlZone, this.User.Identity.Name, true);
         txtStartTime.Value = DateTime.Today.AddDays(-5).ToShortDateString();
         txtEndTime.Value   = DateTime.Today.ToShortDateString();
     }
 }
Пример #23
0
        string BuildLoginGov(string platform, string uid, string time, string cryptKey)
        {
            StringBuilder sb = new StringBuilder();

            sb.Append("platform=").Append(platform).Append("&username="******"&time=").Append(time);
            string sig   = AdminMgr.GetSHA1(sb.ToString() + "&key=" + cryptKey);
            string paras = sb.ToString() + "&sign=" + sig;

            return(paras);
        }
Пример #24
0
 public ActionResult CreateCds(decision_support cds)
 {
     if (string.IsNullOrEmpty(cds.disease_name) == true)
     {
         return(Content("疾病名称不可为空!"));
     }
     AdminMgr.InsertCds(cds);
     //return View();
     return(Content("决策指导已提交!"));
 }
Пример #25
0
    /// <summary>
    /// 初始化人员列表信息
    /// </summary>
    private void initForm()
    {
        AdminMgr  sMgr     = new AdminMgr();
        DataTable dtNumber = sMgr.GetAdminList(this.txtAdminID.Text.Trim(),
                                               this.txtAdminName.Text.Trim());

        this.dgList.DataSource = dtNumber;
        this.lblNumber.Text    = "共" + dtNumber.Rows.Count.ToString() + "条记录";
        this.dgList.DataBind();
    }
Пример #26
0
 private void SaveAdminLog(EnumAdminOperationType operationType, string memo)
 {
     try
     {
         AdminMgr.SaveAdminLog(this.User.Identity.Name, this.Request.UserHostAddress, operationType, _account.ZoneId, _account.Account, _account.Name, _account.ManagerId, memo);
     }
     catch (Exception ex)
     {
         LogHelper.Insert(ex);
     }
 }
Пример #27
0
        string BuildChargeGov(string platform, string uid, string cash, string orderId, string time, string crptyKey)
        {
            StringBuilder sb = new StringBuilder();

            sb.Append("platform=").Append(platform).Append("&username="******"&money=").Append(cash)
            .Append("&orderid=").Append(orderId).Append("&time=").Append(time);
            string sig   = AdminMgr.GetSHA1(sb.ToString() + "&key=" + crptyKey);
            string paras = sb.ToString() + "&sign=" + sig;

            return(paras);
        }
Пример #28
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         txtStartTime.Value = DateTime.Today.AddDays(-5).ToShortDateString();
         txtEndTime.Value   = DateTime.Today.ToShortDateString();
         //StatisticThread.Instance.GetKpi(DateTime.Now,DateTime.Now);
         AdminMgr.BindZoneControl(HttpContext.Current, ddlZone, this.User.Identity.Name, true);
         BindInfo();
     }
 }
Пример #29
0
        //查看文章详细信息
        public ActionResult ArticleDetail(int id)
        {
            var ad = AdminMgr.GetArticleDetail(id);

            if (ad != null)
            {
                return(View("ArticleDetail", ad));
            }
            else
            {
                return(RedirectToAction("Index"));
            }
        }
Пример #30
0
        //查看用户详细信息
        public ActionResult UserDetail(int id)
        {
            var ud = AdminMgr.GetUserDetail(id);

            if (ud != null)
            {
                return(View("UserDetail", ud));
            }
            else
            {
                return(RedirectToAction("UserList"));
            }
        }