示例#1
0
        protected void rplist_OnItemCommand(object source, RepeaterCommandEventArgs e)
        {
            if (e.CommandName == "bj")
            {
                Response.Redirect("ExpertEdit.aspx?ID=" + e.CommandArgument);
            }
            if (e.CommandName == "sc")
            {
                int id        = int.Parse(e.CommandArgument.ToString());
                var newsmodel = be.GetExpertsByID(id);

                if (be.Delete(newsmodel) == 1)
                {
                    //// 插入日志  delete
                    SysOperateLog log = new SysOperateLog();
                    log.LogID           = StringHelper.getKey();
                    log.LogType         = LogType.专家信息.ToString();
                    log.OperateUser     = GetLogUserName();
                    log.OperateDate     = DateTime.Now;
                    log.LogOperateType  = "专家删除";
                    log.LogBeforeObject = JsonHelper.Obj2Json(newsmodel);
                    bsol.Insert(log);
                    Message.ShowOK(this, "删除专家成功!");
                }


                else
                {
                    Message.ShowWrong(this, "删除专家失败");
                }
            }
            BindingList();
        }
示例#2
0
        private void BindDetail()
        {
            Expert e = be.GetExpertsByID(Utils.StrToInt(hfexpertid.Value, 0));

            txtEName.Text                   = e.EName;
            txtECountry.Text                = e.ECountry;
            txtESummary.Text                = e.ESummary;
            dpIstop.SelectedValue           = e.Istop != null && (bool)e.Istop ? "1" : "0";
            dpEIdentification.SelectedValue = e.EIdentification;
            if (e.EPicPath != "")
            {
                ImgNews.ImageUrl = PicFilePathV + e.EPicPath;
            }
        }
示例#3
0
        private void BindDetail()
        {
            Expert e = be.GetExpertsByID(Utils.StrToInt(id, 0));

            hfEID.Value       = e.ExpertID.ToString();
            ltexpertname.Text = e.EName;
            ltsummary.Text    = e.ESummary;
            //img.ImageUrl = PicFilePathV + e.EPicPath;
            //HtmlImage img=
            if (e.EPicPath != null)
            {
                htmlimg.Attributes["src"] = PicFilePathV + e.EPicPath;
            }
        }