Пример #1
0
 private void ShowInfo(int NodeID)
 {
     JSoft.BLL.SA.Tree   bll   = new JSoft.BLL.SA.Tree();
     JSoft.Model.SA.Tree model = bll.GetModel(NodeID);
     this.lblNodeID.Text       = model.NodeID.ToString();
     this.lblTreeText.Text     = model.TreeText;
     this.lblParentID.Text     = model.ParentID.ToString();
     this.lblParentPath.Text   = model.ParentPath;
     this.lblLocation.Text     = model.Location;
     this.lblOrderID.Text      = model.OrderID.ToString();
     this.lblComment.Text      = model.Comment;
     this.lblUrl.Text          = model.Url;
     this.lblPermissionID.Text = model.PermissionID.ToString();
     this.lblImageUrl.Text     = model.ImageUrl;
     this.lblModuleID.Text     = model.ModuleID.ToString();
     this.lblKeShiDM.Text      = model.KeShiDM.ToString();
     this.lblKeshiPublic.Text  = model.KeshiPublic;
     this.lblTreeType.Text     = model.TreeType.ToString();
     this.lblEnabled.Text      = model.Enabled?"是":"否";
 }
Пример #2
0
 private void ShowInfo(int NodeID)
 {
     JSoft.BLL.SA.Tree   bll   = new JSoft.BLL.SA.Tree();
     JSoft.Model.SA.Tree model = bll.GetModel(NodeID);
     this.lblNodeID.Text       = model.NodeID.ToString();
     this.txtTreeText.Text     = model.TreeText;
     this.txtParentID.Text     = model.ParentID.ToString();
     this.txtParentPath.Text   = model.ParentPath;
     this.txtLocation.Text     = model.Location;
     this.txtOrderID.Text      = model.OrderID.ToString();
     this.txtComment.Text      = model.Comment;
     this.txtUrl.Text          = model.Url;
     this.txtPermissionID.Text = model.PermissionID.ToString();
     this.txtImageUrl.Text     = model.ImageUrl;
     this.txtModuleID.Text     = model.ModuleID.ToString();
     this.txtKeShiDM.Text      = model.KeShiDM.ToString();
     this.txtKeshiPublic.Text  = model.KeshiPublic;
     this.txtTreeType.Text     = model.TreeType.ToString();
     this.chkEnabled.Checked   = model.Enabled;
 }
Пример #3
0
        protected void btnDelete_Click(object sender, EventArgs e)
        {
            /*权限配置开始*/
            if (!UserPrincipal.HasPermissionID(GetPermidByActID(Act_DeleteList)) && GetPermidByActID(Act_DeleteList) != -1)//批量删除按钮
            {
                return;
            }
            /*权限配置结束*/
            string idlist = GetSelIDlist();

            if (idlist.Trim().Length == 0)
            {
                return;
            }
            /*增加日志*/ foreach (var id in idlist.Split(','))
            {
                LogHelp.AddUserLog(CurrentUser.UserName, CurrentUser.UserType, string.Format("Delete:【{0}】", new JavaScriptSerializer().Serialize(bll.GetModel(Common.Globals.SafeInt(id, 0)))), this);
            }
            bll.DeleteList(idlist);
            JSoft.Common.MessageBox.Show(this, Resources.Site.TooltipDelOK);
            gridView.OnBind();
        }
Пример #4
0
        public void btnSave_Click(object sender, EventArgs e)
        {
            string strErr = "";

            if (this.txtTreeText.Text.Trim().Length == 0)
            {
                strErr += "TreeText不能为空!\\n";
            }
            if (!PageValidate.IsNumber(txtParentID.Text))
            {
                strErr += "ParentID格式错误!\\n";
            }
            if (this.txtParentPath.Text.Trim().Length == 0)
            {
                strErr += "ParentPath不能为空!\\n";
            }
            if (this.txtLocation.Text.Trim().Length == 0)
            {
                strErr += "Location不能为空!\\n";
            }
            if (!PageValidate.IsNumber(txtOrderID.Text))
            {
                strErr += "OrderID格式错误!\\n";
            }
            if (this.txtComment.Text.Trim().Length == 0)
            {
                strErr += "Comment不能为空!\\n";
            }
            if (this.txtUrl.Text.Trim().Length == 0)
            {
                strErr += "Url不能为空!\\n";
            }
            if (!PageValidate.IsNumber(txtPermissionID.Text))
            {
                strErr += "PermissionID格式错误!\\n";
            }
            if (this.txtImageUrl.Text.Trim().Length == 0)
            {
                strErr += "ImageUrl不能为空!\\n";
            }
            if (!PageValidate.IsNumber(txtModuleID.Text))
            {
                strErr += "ModuleID格式错误!\\n";
            }
            if (!PageValidate.IsNumber(txtKeShiDM.Text))
            {
                strErr += "KeShiDM格式错误!\\n";
            }
            if (this.txtKeshiPublic.Text.Trim().Length == 0)
            {
                strErr += "KeshiPublic不能为空!\\n";
            }
            if (!PageValidate.IsNumber(txtTreeType.Text))
            {
                strErr += "TreeType格式错误!\\n";
            }

            if (strErr != "")
            {
                MessageBox.ShowFailTip(this, strErr);
                return;
            }
            int    NodeID       = int.Parse(Request.Params["id"]);
            string TreeText     = this.txtTreeText.Text;
            int    ParentID     = int.Parse(this.txtParentID.Text);
            string ParentPath   = this.txtParentPath.Text;
            string Location     = this.txtLocation.Text;
            int    OrderID      = int.Parse(this.txtOrderID.Text);
            string Comment      = this.txtComment.Text;
            string Url          = this.txtUrl.Text;
            int    PermissionID = int.Parse(this.txtPermissionID.Text);
            string ImageUrl     = this.txtImageUrl.Text;
            int    ModuleID     = int.Parse(this.txtModuleID.Text);
            int    KeShiDM      = int.Parse(this.txtKeShiDM.Text);
            string KeshiPublic  = this.txtKeshiPublic.Text;
            int    TreeType     = int.Parse(this.txtTreeType.Text);
            bool   Enabled      = this.chkEnabled.Checked;


            JSoft.BLL.SA.Tree   bll   = new JSoft.BLL.SA.Tree();
            JSoft.Model.SA.Tree model = bll.GetModel(NodeID);          //更新的时候再查询一次,如业务需要可直接new一个实体以减少损耗
            /*增加日志*/ LogHelp.AddUserLog(CurrentUser.UserName, CurrentUser.UserType, string.Format("Modify-Old:【{0}】", new JavaScriptSerializer().Serialize(model)), this);
            model.NodeID       = NodeID;
            model.TreeText     = TreeText;
            model.ParentID     = ParentID;
            model.ParentPath   = ParentPath;
            model.Location     = Location;
            model.OrderID      = OrderID;
            model.Comment      = Comment;
            model.Url          = Url;
            model.PermissionID = PermissionID;
            model.ImageUrl     = ImageUrl;
            model.ModuleID     = ModuleID;
            model.KeShiDM      = KeShiDM;
            model.KeshiPublic  = KeshiPublic;
            model.TreeType     = TreeType;
            model.Enabled      = Enabled;

            bll.Update(model);
            JSoft.Common.MessageBox.ShowSuccessTip(this, "保存成功!", "list.aspx");
            /*增加日志*/ LogHelp.AddUserLog(CurrentUser.UserName, CurrentUser.UserType, string.Format("Modify-New:【{0}】", new JavaScriptSerializer().Serialize(model)), this);
        }