コード例 #1
0
        private string Get_NavigateName(string strGUID)
        {
            zlzw.BLL.NavigateListBLL navigateListBLL = new zlzw.BLL.NavigateListBLL();
            System.Data.DataTable dt = navigateListBLL.GetList("NavigateGUID='" + strGUID + "'").Tables[0];

            return dt.Rows[0]["NavigateName"].ToString();
        }
コード例 #2
0
        private void NavigateList_BindGrid()
        {
            zlzw.BLL.NavigateListBLL navigateListBLL = new zlzw.BLL.NavigateListBLL();
            DataTable dt = navigateListBLL.GetList(grid1.PageSize, grid1.PageIndex + 1, "*", "OrderNumber", 0, "asc", "IsEnable=1").Tables[0];

            grid1.DataSource = dt;
            grid1.DataBind();
        }
コード例 #3
0
        private void Load_MenuList()
        {
            zlzw.BLL.NavigateListBLL navigateListBLL = new zlzw.BLL.NavigateListBLL();
            System.Data.DataTable dt = navigateListBLL.GetList("IsEnable=1 and IsShow=1 order by OrderNumber asc").Tables[0];

            Repeater1.DataSource = dt;
            Repeater1.DataBind();
        }
コード例 #4
0
 private void Get_NavigateItemGUID()
 {
     zlzw.BLL.NavigateListBLL navigateListBLL = new zlzw.BLL.NavigateListBLL();
     System.Data.DataTable dt = navigateListBLL.GetList("IsEnable=1 and IsShow=1 order by OrderNumber asc").Tables[0];
     if (dt.Rows.Count > 0)
     {
         linkBtnServiceItem.HRef = "../EnterpriseServiceList.aspx?id=" + dt.Rows[0]["NavigateGUID"].ToString();
     }
 }
コード例 #5
0
        private void Load_NavigateList()
        {
            zlzw.BLL.NavigateListBLL navigateListBLL = new zlzw.BLL.NavigateListBLL();
            DataTable dt = navigateListBLL.GetList("IsEnable=1 order by OrderNumber asc").Tables[0];

            drpNavigateGUID.DataTextField = "NavigateName";
            drpNavigateGUID.DataValueField = "NavigateGUID";

            drpNavigateGUID.DataSource = dt;
            drpNavigateGUID.DataBind();
        }
コード例 #6
0
 /// <summary>
 /// 获取总页数
 /// </summary>
 /// <returns></returns>
 private int Get_NavigateListTotalCount()
 {
     zlzw.BLL.NavigateListBLL navigateListBLL = new zlzw.BLL.NavigateListBLL();
     DataTable dt = navigateListBLL.GetList("IsEnable=1").Tables[0];
     if (dt.Rows.Count > 0)
     {
         return dt.Rows.Count;
     }
     else
     {
         return 0;
     }
 }
コード例 #7
0
        protected void btnSaveRefresh_Click(object sender, EventArgs e)
        {
            if (Request.QueryString["Type"] == "1")
            {
                //编辑保存
                zlzw.Model.NavigateListModel navigateListModel = new zlzw.Model.NavigateListModel();
                navigateListModel.NavigateName = txbNavigateName.Text;
                navigateListModel.OrderNumber = int.Parse(txbOrderNumber.Text);
                navigateListModel.IsEnable = 1;
                if (ckbIsShow.Checked)
                {
                    navigateListModel.IsShow = 1;
                }
                else
                {
                    navigateListModel.IsShow = 0;
                }
                navigateListModel.PublishDate = DateTime.Parse(ViewState["PublishDate"].ToString());
                navigateListModel.NavigateGUID = new Guid(ViewState["NavigateGUID"].ToString());
                zlzw.BLL.NavigateListBLL navigateListBLL = new zlzw.BLL.NavigateListBLL();
                navigateListModel.NavigateID = int.Parse(Get_ID(navigateListBLL, Request.QueryString["value"]));

                navigateListBLL.Update(navigateListModel);
            }
            else
            {
                //添加保存

                zlzw.Model.NavigateListModel navigateListModel = new zlzw.Model.NavigateListModel();
                navigateListModel.NavigateName = txbNavigateName.Text;
                navigateListModel.OrderNumber = int.Parse(txbOrderNumber.Text);
                navigateListModel.IsEnable = 1;
                if (ckbIsShow.Checked)
                {
                    navigateListModel.IsShow = 1;
                }
                else
                {
                    navigateListModel.IsShow = 0;
                }
                navigateListModel.PublishDate = Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss"));
                zlzw.BLL.NavigateListBLL navigateListBLL = new zlzw.BLL.NavigateListBLL();
                navigateListBLL.Add(navigateListModel);
            }

            // 2. Close this window and Refresh parent window
            PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
        }
コード例 #8
0
 private void Load_NavigateList()
 {
     zlzw.BLL.NavigateListBLL navigateListBLL = new zlzw.BLL.NavigateListBLL();
     DataTable dt = navigateListBLL.GetList("IsEnable=1 and IsShow=1 order by OrderNumber asc").Tables[0];
     labNavigate.Text = "";
     for (int nCount = 0; nCount < dt.Rows.Count; nCount++)
     {
         if (nCount == 3)
         {
             labNavigate.Text += "<a href='NaviagteInfo.aspx?id=" + dt.Rows[nCount]["NavigateGUID"].ToString() + "' style='color:#093C7E;text-decoration:none;'>" + dt.Rows[nCount]["NavigateName"].ToString() + "</a><br/>";
         }
         else if (nCount == 7)
         {
             labNavigate.Text += "<a href='NaviagteInfo.aspx?id=" + dt.Rows[nCount]["NavigateGUID"].ToString() + "' style='color:#093C7E;text-decoration:none;'>" + dt.Rows[nCount]["NavigateName"].ToString() + "</a>";
         }
         else
         {
             labNavigate.Text += "<a href='NaviagteInfo.aspx?id=" + dt.Rows[nCount]["NavigateGUID"].ToString() + "' style='color:#093C7E;text-decoration:none;'>" + dt.Rows[nCount]["NavigateName"].ToString() + "</a> | ";
         }
     }
 }
コード例 #9
0
 private void LoadData(string strType)
 {
     if (strType == "1")
     {
         string strID = Request.QueryString["value"];//操作ID
         zlzw.BLL.NavigateListBLL navigateListBLL = new zlzw.BLL.NavigateListBLL();
         zlzw.Model.NavigateListModel navigateListModel = navigateListBLL.GetModel(int.Parse(Get_ID(navigateListBLL, strID)));
         txbNavigateName.Text = navigateListModel.NavigateName;//菜单名称
         txbOrderNumber.Text = navigateListModel.OrderNumber.ToString();//排序
         if (navigateListModel.IsShow == 1)
         {
             ckbIsShow.Checked = true;
         }
         else
         {
             ckbIsShow.Checked = false;
         }
         ViewState["PublishDate"] = navigateListModel.PublishDate.ToString();
         ViewState["NavigateGUID"] = navigateListModel.NavigateGUID.ToString();
         ToolbarText2.Text = "编辑一个导航菜单";
     }
     btnClose.OnClientClick = ActiveWindow.GetConfirmHideReference();
 }
コード例 #10
0
        protected void btnDel_Click(object sender, EventArgs e)
        {
            if (grid1.SelectedRowIndexArray != null && grid1.SelectedRowIndexArray.Length > 0)
            {
                string strSelectID = "0";
                for (int i = 0, count = grid1.SelectedRowIndexArray.Length; i < count; i++)
                {
                    int rowIndex = grid1.SelectedRowIndexArray[i];
                    foreach (object key in grid1.DataKeys[rowIndex])
                    {
                        strSelectID = key.ToString();
                    }
                }
                #region 删除逻辑

                zlzw.BLL.NavigateListBLL navigateListBLL = new zlzw.BLL.NavigateListBLL();
                DataTable dt = navigateListBLL.GetList("UserGuid='" + strSelectID + "'").Tables[0];
                zlzw.Model.NavigateListModel navigateListModel = navigateListBLL.GetModel(int.Parse(dt.Rows[0]["NavigateGUID"].ToString()));
                navigateListModel.IsEnable = 0;
                navigateListBLL.Update(navigateListModel);
                NavigateList_BindGrid();

                #endregion
            }
            else
            {
                return;
            }
        }
コード例 #11
0
 private string Get_NavigateName(string strNavigateGUID)
 {
     zlzw.BLL.NavigateListBLL navigateListBLL = new zlzw.BLL.NavigateListBLL();
     DataTable dt = navigateListBLL.GetList("NavigateGUID='"+ strNavigateGUID +"'").Tables[0];
     if (dt.Rows.Count > 0)
     {
         return dt.Rows[0]["NavigateName"].ToString();
     }
     else
     {
         return "未知类型";
     }
 }