private string Get_EnterpriseServiceName(string strGUID)
        {
            zlzw.BLL.EnterpriseServiceTypeListBLL enterpriseServiceTypeListBLL = new zlzw.BLL.EnterpriseServiceTypeListBLL();
            System.Data.DataTable dt = enterpriseServiceTypeListBLL.GetList("EnterpriseServiceTypeGUID='" + strGUID + "'").Tables[0];

            return dt.Rows[0]["EnterpriseServiceTypeName"].ToString();
        }
        private void EnterpriseServiceTypeList_BindGrid()
        {
            zlzw.BLL.EnterpriseServiceTypeListBLL enterpriseServiceTypeListBLL = new zlzw.BLL.EnterpriseServiceTypeListBLL();
            DataTable dt = enterpriseServiceTypeListBLL.GetList(grid1.PageSize, grid1.PageIndex + 1, "*", "PublishDate", 0, "desc", "IsEnable=1").Tables[0];

            grid1.DataSource = dt;
            grid1.DataBind();
        }
        private void Load_MenuList()
        {
            zlzw.BLL.EnterpriseServiceTypeListBLL enterpriseServiceTypeListBLL = new zlzw.BLL.EnterpriseServiceTypeListBLL();
            System.Data.DataTable dt = enterpriseServiceTypeListBLL.GetList("IsEnable=1 order by OrderNumber asc").Tables[0];

            Repeater1.DataSource = dt;
            Repeater1.DataBind();
        }
        private void Load_EnterpriseServiceTypeGUID()
        {
            zlzw.BLL.EnterpriseServiceTypeListBLL enterpriseServiceTypeListBLL = new zlzw.BLL.EnterpriseServiceTypeListBLL();
            DataTable dt = enterpriseServiceTypeListBLL.GetList("IsEnable=1 order by OrderNumber asc").Tables[0];

            drpEnterpriseServiceTypeGUID.DataTextField = "EnterpriseServiceTypeName";
            drpEnterpriseServiceTypeGUID.DataValueField = "EnterpriseServiceTypeGUID";

            drpEnterpriseServiceTypeGUID.DataSource = dt;
            drpEnterpriseServiceTypeGUID.DataBind();
        }
 /// <summary>
 /// 获取总页数
 /// </summary>
 /// <returns></returns>
 private int Get_EnterpriseServiceTypeListTotalCount()
 {
     zlzw.BLL.EnterpriseServiceTypeListBLL enterpriseServiceTypeListBLL = new zlzw.BLL.EnterpriseServiceTypeListBLL();
     DataTable dt = enterpriseServiceTypeListBLL.GetList("IsEnable=1").Tables[0];
     if (dt.Rows.Count > 0)
     {
         return dt.Rows.Count;
     }
     else
     {
         return 0;
     }
 }
        protected void btnSaveRefresh_Click(object sender, EventArgs e)
        {
            if (Request.QueryString["Type"] == "1")
            {
                //编辑保存
                zlzw.Model.EnterpriseServiceTypeListModel enterpriseServiceTypeListModel = new zlzw.Model.EnterpriseServiceTypeListModel();
                enterpriseServiceTypeListModel.EnterpriseServiceTypeName = txbEnterpriseServiceTypeName.Text;
                enterpriseServiceTypeListModel.OrderNumber = int.Parse(txbOrderNumber.Text);
                if (ckbIsHot.Checked)
                {
                    enterpriseServiceTypeListModel.IsHot = 1;
                }
                else
                {
                    enterpriseServiceTypeListModel.IsHot = 0;
                }
                enterpriseServiceTypeListModel.IsEnable = 1;
                enterpriseServiceTypeListModel.PublishDate = DateTime.Parse(ViewState["PublishDate"].ToString());
                enterpriseServiceTypeListModel.EnterpriseServiceTypeGUID = new Guid(ViewState["EnterpriseServiceTypeGUID"].ToString());
                zlzw.BLL.EnterpriseServiceTypeListBLL enterpriseServiceTypeListBLL = new zlzw.BLL.EnterpriseServiceTypeListBLL();
                enterpriseServiceTypeListModel.EnterpriseServiceTypeID = int.Parse(Get_ID(enterpriseServiceTypeListBLL, Request.QueryString["value"]));

                enterpriseServiceTypeListBLL.Update(enterpriseServiceTypeListModel);
            }
            else
            {
                //添加保存

                zlzw.Model.EnterpriseServiceTypeListModel enterpriseServiceTypeListModel = new zlzw.Model.EnterpriseServiceTypeListModel();
                enterpriseServiceTypeListModel.EnterpriseServiceTypeName = txbEnterpriseServiceTypeName.Text;
                enterpriseServiceTypeListModel.OrderNumber = int.Parse(txbOrderNumber.Text);
                if (ckbIsHot.Checked)
                {
                    enterpriseServiceTypeListModel.IsHot = 1;
                }
                else
                {
                    enterpriseServiceTypeListModel.IsHot = 0;
                }
                enterpriseServiceTypeListModel.IsEnable = 1;
                enterpriseServiceTypeListModel.PublishDate = Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss"));
                zlzw.BLL.EnterpriseServiceTypeListBLL enterpriseServiceTypeListBLL = new zlzw.BLL.EnterpriseServiceTypeListBLL();
                enterpriseServiceTypeListBLL.Add(enterpriseServiceTypeListModel);
            }

            // 2. Close this window and Refresh parent window
            PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
        }
 private void LoadData(string strType)
 {
     if (strType == "1")
     {
         string strID = Request.QueryString["value"];//操作ID
         zlzw.BLL.EnterpriseServiceTypeListBLL enterpriseServiceTypeListBLL = new zlzw.BLL.EnterpriseServiceTypeListBLL();
         zlzw.Model.EnterpriseServiceTypeListModel enterpriseServiceTypeListModel     = enterpriseServiceTypeListBLL.GetModel(int.Parse(Get_ID(enterpriseServiceTypeListBLL, strID)));
         txbEnterpriseServiceTypeName.Text = enterpriseServiceTypeListModel.EnterpriseServiceTypeName;//服务名称
         txbOrderNumber.Text = enterpriseServiceTypeListModel.OrderNumber.ToString();//排序号
         if (enterpriseServiceTypeListModel.IsHot == 1)
         {
             ckbIsHot.Checked = true;
         }
         else
         {
             ckbIsHot.Checked = false; ;
         }
         ViewState["PublishDate"] = enterpriseServiceTypeListModel.PublishDate.ToString();
         ViewState["EnterpriseServiceTypeGUID"] = enterpriseServiceTypeListModel.EnterpriseServiceTypeGUID.ToString();
         ToolbarText2.Text = "编辑一个企业服务类型";
     }
     btnClose.OnClientClick = ActiveWindow.GetConfirmHideReference();
 }
 private string Get_EnterpriseServiceTypename(string strGUID)
 {
     zlzw.BLL.EnterpriseServiceTypeListBLL enterpriseServiceTypeListBLL = new zlzw.BLL.EnterpriseServiceTypeListBLL();
     DataTable dt = enterpriseServiceTypeListBLL.GetList("EnterpriseServiceTypeGUID='"+ strGUID +"'").Tables[0];
     if (dt.Rows.Count > 0)
     {
         return dt.Rows[0]["EnterpriseServiceTypeName"].ToString();
     }
     else
     {
         return "未知类型";
     }
 }
Exemplo n.º 9
0
 private void Load_EnterpriseServiceList()
 {
     zlzw.BLL.EnterpriseServiceTypeListBLL enterpriseServiceTypeListBLL = new zlzw.BLL.EnterpriseServiceTypeListBLL();
     DataTable dt = enterpriseServiceTypeListBLL.GetList("IsEnable=1 order by OrderNumber asc").Tables[0];
     DataList1.DataSource = dt;
     DataList1.DataBind();
 }
        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.EnterpriseServiceTypeListBLL enterpriseServiceTypeListBLL = new zlzw.BLL.EnterpriseServiceTypeListBLL();
                DataTable dt = enterpriseServiceTypeListBLL.GetList("EnterpriseServiceTypeGUID='" + strSelectID + "'").Tables[0];
                zlzw.Model.EnterpriseServiceTypeListModel enterpriseServiceTypeListModel = enterpriseServiceTypeListBLL.GetModel(int.Parse(dt.Rows[0]["EnterpriseServiceTypeID"].ToString()));
                enterpriseServiceTypeListModel.IsEnable = 0;
                enterpriseServiceTypeListBLL.Update(enterpriseServiceTypeListModel);
                EnterpriseServiceTypeList_BindGrid();

                #endregion
            }
            else
            {
                return;
            }
        }