/// <summary>
 /// 初始化添加/编辑表单
 /// </summary>
 public void Initialize()
 {
     try
     {
         ZhuJi.Modules.SinglePageModule.IDAL.ISinglePage  singlePage       = ZhuJi.AOP.Operator.WrapInterface(typeof(ZhuJi.Modules.SinglePageModule.NHibernateDAL.SinglePage)) as ZhuJi.Modules.SinglePageModule.IDAL.ISinglePage;
         ZhuJi.Modules.SinglePageModule.Domain.SinglePage domainSinglePage = singlePage.GetObjectByChannelId(_identity);
         if (domainSinglePage != null)
         {
             UIMapping.BindObjectToControls(domainSinglePage, this);
             UIMapping.BindObjectToControls(domainSinglePage.ContentBaseInfo, this);
             ContentBaseId.Text = domainSinglePage.ContentBaseInfo.Id.ToString();
             Id.Text            = domainSinglePage.Id.ToString();
             btnAdd.Visible     = false;
             btnEdit.Visible    = true;
             btnDel.Visible     = true;
         }
         else
         {
             btnAdd.Visible     = true;
             btnEdit.Visible    = false;
             btnDel.Visible     = false;
             ChannelId.Text     = _identity.ToString();
             CreatedByIp.Text   = GlobalHelper.IP;
             CreatedByUser.Text = GlobalHelper.User;
             CreatedByDate.Text = GlobalHelper.Time.ToString();
         }
     }
     catch (Exception ex)
     {
         ShowMessage(ex);
     }
 }
        /// <summary>
        /// 初始化编辑表单
        /// </summary>
        private void Edit()
        {
            try
            {
                ZhuJi.Modules.CountModule.Domain.CountProfiles domainCountProfiles = new ZhuJi.Modules.CountModule.Domain.CountProfiles();

                ZhuJi.Modules.CountModule.IDAL.ICountProfiles countProfiles = ZhuJi.AOP.Operator.WrapInterface(typeof(ZhuJi.Modules.CountModule.SQLServerDAL.CountProfiles)) as ZhuJi.Modules.CountModule.IDAL.ICountProfiles;
                DataSet ds = countProfiles.GetObjects();
                DataRow dr;
                if (ds.Tables[0].Rows.Count > 0)
                {
                    dr = ds.Tables[0].Rows[0];
                    domainCountProfiles.Todaypvs     = (int)dr["Pvs"];
                    domainCountProfiles.Todayips     = (int)dr["Ips"];
                    domainCountProfiles.Totalcookies = (int)dr["Cookies"];
                }
                if (ds.Tables[1].Rows.Count > 0)
                {
                    dr = ds.Tables[1].Rows[0];
                    domainCountProfiles.Yesterdaypvs     = (int)dr["Pvs"];
                    domainCountProfiles.Yesterdayips     = (int)dr["Ips"];
                    domainCountProfiles.Yesterdaycookies = (int)dr["Cookies"];
                }
                if (ds.Tables[2].Rows.Count > 0)
                {
                    dr = ds.Tables[2].Rows[0];
                    domainCountProfiles.Maxpvs     = (int)dr["Pvs"];
                    domainCountProfiles.Maxips     = (int)dr["Ips"];
                    domainCountProfiles.Maxcookies = (int)dr["Cookies"];
                }
                if (ds.Tables[3].Rows.Count > 0)
                {
                    dr = ds.Tables[3].Rows[0];
                    domainCountProfiles.Totalpvs     = (int)dr["Pvs"];
                    domainCountProfiles.Totalips     = (int)dr["Ips"];
                    domainCountProfiles.Totalcookies = (int)dr["Cookies"];
                }
                if (ds.Tables[4].Rows.Count > 0)
                {
                    dr = ds.Tables[4].Rows[0];
                    domainCountProfiles.BeginDate = (DateTime)dr["BeginDate"];
                    int days = DateTime.Today.DayOfYear - domainCountProfiles.BeginDate.DayOfYear;
                    if (days > 0)
                    {
                        domainCountProfiles.Averagepvs     = domainCountProfiles.Totalpvs / days;
                        domainCountProfiles.Averageips     = domainCountProfiles.Totalips / days;
                        domainCountProfiles.Averagecookies = domainCountProfiles.Totalcookies / days;
                    }
                }
                UIMapping.BindObjectToControls(domainCountProfiles, this);
            }
            catch (Exception ex)
            {
                ShowMessage(ex);
            }
        }
 /// <summary>
 /// 初始化表单
 /// </summary>
 public void Initialize()
 {
     try
     {
         ZhuJi.Modules.ArticleModule.IDAL.IArticle  article       = ZhuJi.AOP.Operator.WrapInterface(typeof(ZhuJi.Modules.ArticleModule.NHibernateDAL.Article)) as ZhuJi.Modules.ArticleModule.IDAL.IArticle;
         ZhuJi.Modules.ArticleModule.Domain.Article domainArticle = article.GetObject(_identity);
         UIMapping.BindObjectToControls(domainArticle, this);
         UIMapping.BindObjectToControls(domainArticle.ContentBaseInfo, this);
     }
     catch (Exception ex)
     {
         ShowMessage(ex);
     }
 }
        /// <summary>
        /// 初始化编辑表单
        /// </summary>
        private void Edit()
        {
            btnEdit.Visible = true;
            btnDel.Visible  = true;

            try
            {
                ZhuJi.UUMS.IDAL.IPermissionByCommon  permissionByCommon       = ZhuJi.AOP.Operator.WrapInterface(typeof(ZhuJi.UUMS.NHibernateDAL.PermissionByCommon)) as ZhuJi.UUMS.IDAL.IPermissionByCommon;
                ZhuJi.UUMS.Domain.PermissionByCommon domainPermissionByCommon = permissionByCommon.GetObject(_identity);
                UIMapping.BindObjectToControls(domainPermissionByCommon, this);
            }
            catch (Exception ex)
            {
                ShowMessage(ex);
            }
        }
Beispiel #5
0
 /// <summary>
 /// 初始化编辑表单
 /// </summary>
 private void Edit()
 {
     btnAdd.Visible  = true;
     btnAdd.Text     = "另存为新记录";
     btnEdit.Visible = true;
     btnDel.Visible  = true;
     try
     {
         ZhuJi.Modules.VoteModule.IDAL.IVoteSubject  voteSubject       = ZhuJi.AOP.Operator.WrapInterface(typeof(ZhuJi.Modules.VoteModule.NHibernateDAL.VoteSubject)) as ZhuJi.Modules.VoteModule.IDAL.IVoteSubject;
         ZhuJi.Modules.VoteModule.Domain.VoteSubject domainVoteSubject = voteSubject.GetObject(_identity);
         UIMapping.BindObjectToControls(domainVoteSubject, this);
     }
     catch (Exception ex)
     {
         ShowMessage(ex);
     }
 }
Beispiel #6
0
 /// <summary>
 /// 初始化编辑表单
 /// </summary>
 private void Edit()
 {
     btnAdd.Visible  = true;
     btnAdd.Text     = "另存为新记录";
     btnEdit.Visible = true;
     btnDel.Visible  = true;
     try
     {
         ZhuJi.Portal.IDAL.ISkin  skin       = ZhuJi.AOP.Operator.WrapInterface(typeof(ZhuJi.Portal.NHibernateDAL.Skin)) as ZhuJi.Portal.IDAL.ISkin;
         ZhuJi.Portal.Domain.Skin domainSkin = skin.GetObject(_identity);
         UIMapping.BindObjectToControls(domainSkin, this);
     }
     catch (Exception ex)
     {
         ShowMessage(ex);
     }
 }
 /// <summary>
 /// 初始化编辑表单
 /// </summary>
 private void Edit()
 {
     btnAdd.Visible  = true;
     btnAdd.Text     = "另存为新记录";
     btnEdit.Visible = true;
     btnDel.Visible  = true;
     try
     {
         ZhuJi.UUMS.IDAL.IPermissionByMethods  permissionByMethods       = ZhuJi.AOP.Operator.WrapInterface(typeof(ZhuJi.UUMS.NHibernateDAL.PermissionByMethods)) as ZhuJi.UUMS.IDAL.IPermissionByMethods;
         ZhuJi.UUMS.Domain.PermissionByMethods domainPermissionByMethods = permissionByMethods.GetObject(_identity);
         UIMapping.BindObjectToControls(domainPermissionByMethods, this);
     }
     catch (Exception ex)
     {
         ShowMessage(ex);
     }
 }
 /// <summary>
 /// 初始化表单
 /// </summary>
 public void Initialize()
 {
     try
     {
         ZhuJi.Modules.SinglePageModule.IDAL.ISinglePage  singlePage       = ZhuJi.AOP.Operator.WrapInterface(typeof(ZhuJi.Modules.SinglePageModule.NHibernateDAL.SinglePage)) as ZhuJi.Modules.SinglePageModule.IDAL.ISinglePage;
         ZhuJi.Modules.SinglePageModule.Domain.SinglePage domainSinglePage = singlePage.GetObjectByChannelId(_identity);
         if (domainSinglePage != null)
         {
             UIMapping.BindObjectToControls(domainSinglePage, this);
             UIMapping.BindObjectToControls(domainSinglePage.ContentBaseInfo, this);
         }
     }
     catch (Exception ex)
     {
         ShowMessage(ex);
     }
 }
 /// <summary>
 /// 初始化编辑表单
 /// </summary>
 private void Edit()
 {
     btnAdd.Visible  = true;
     btnAdd.Text     = "另存为新记录";
     btnEdit.Visible = true;
     btnDel.Visible  = true;
     try
     {
         ZhuJi.Modules.AdsModule.IDAL.IAdsInfor  adsInfor       = ZhuJi.AOP.Operator.WrapInterface(typeof(ZhuJi.Modules.AdsModule.NHibernateDAL.AdsInfor)) as ZhuJi.Modules.AdsModule.IDAL.IAdsInfor;
         ZhuJi.Modules.AdsModule.Domain.AdsInfor domainAdsInfor = adsInfor.GetObject(_identity);
         UIMapping.BindObjectToControls(domainAdsInfor, this);
     }
     catch (Exception ex)
     {
         ShowMessage(ex);
     }
 }
Beispiel #10
0
 /// <summary>
 /// 初始化查询列表
 /// </summary>
 public void List()
 {
     try
     {
         ZhuJi.Modules.RssModule.IDAL.IRssChannel  rssChannel       = ZhuJi.AOP.Operator.WrapInterface(typeof(ZhuJi.Modules.RssModule.SQLServerDAL.RssChannel)) as ZhuJi.Modules.RssModule.IDAL.IRssChannel;
         ZhuJi.Modules.RssModule.Domain.RssChannel domainRssChannel = rssChannel.GetObject(_identity);
         if (domainRssChannel != null)
         {
             UIMapping.BindObjectToControls(domainRssChannel, this);
             rptList.DataSource = domainRssChannel.RssItems;
             rptList.DataBind();
         }
     }
     catch (Exception ex)
     {
         ShowMessage(ex);
     }
 }
 /// <summary>
 /// 初始化编辑表单
 /// </summary>
 private void Edit()
 {
     btnAdd.Visible  = true;
     btnAdd.Text     = "另存为新记录";
     btnEdit.Visible = true;
     btnDel.Visible  = true;
     try
     {
         ZhuJi.Modules.ArticleModule.IDAL.IArticle  article       = ZhuJi.AOP.Operator.WrapInterface(typeof(ZhuJi.Modules.ArticleModule.NHibernateDAL.Article)) as ZhuJi.Modules.ArticleModule.IDAL.IArticle;
         ZhuJi.Modules.ArticleModule.Domain.Article domainArticle = article.GetObject(_identity);
         UIMapping.BindObjectToControls(domainArticle, this);
         UIMapping.BindObjectToControls(domainArticle.ContentBaseInfo, this);
         ContentBaseId.Text = domainArticle.ContentBaseInfo.Id.ToString();
         Id.Text            = domainArticle.Id.ToString();
     }
     catch (Exception ex)
     {
         ShowMessage(ex);
     }
 }
Beispiel #12
0
        /// <summary>
        /// 初始化编辑表单
        /// </summary>
        private void Edit()
        {
            btnAdd.Visible  = true;
            btnAdd.Text     = "另存为新记录";
            btnEdit.Visible = true;
            btnDel.Visible  = true;
            try
            {
                ZhuJi.UUMS.IDAL.IUsers  users       = ZhuJi.AOP.Operator.WrapInterface(typeof(ZhuJi.UUMS.NHibernateDAL.Users)) as ZhuJi.UUMS.IDAL.IUsers;
                ZhuJi.UUMS.Domain.Users domainUsers = users.GetObject(_identity);
                UIMapping.BindObjectToControls(domainUsers, this);

                Password.Enabled   = false;
                cbPassword.Visible = true;
            }
            catch (Exception ex)
            {
                ShowMessage(ex);
            }
        }