private void ButtonBind()
        {
            HeadMenuButtonItem bi0 = new HeadMenuButtonItem();
            bi0.ButtonPopedom = PopedomType.New;
            bi0.ButtonName = "部门";
            bi0.ButtonUrl = string.Format("New.aspx?GroupID={0}", GroupID);
            HeadMenuWebControls1.ButtonList.Add(bi0);

            HeadMenuButtonItem bi1 = new HeadMenuButtonItem();
            bi1.ButtonPopedom = PopedomType.Orderby;
            bi1.ButtonName = "子部门";
            bi1.ButtonUrl = string.Format("Orderby.aspx?GroupID={0}",GroupID);
            HeadMenuWebControls1.ButtonList.Add(bi1);
            if (GroupID != 0)
            {
                HeadMenuButtonItem bi2 = new HeadMenuButtonItem();
                bi2.ButtonPopedom = PopedomType.Edit;
                bi2.ButtonName = "部门";
                bi2.ButtonUrl = string.Format("Edit.aspx?GroupID={0}", GroupID);
                HeadMenuWebControls1.ButtonList.Add(bi2);

                HeadMenuButtonItem bi3 = new HeadMenuButtonItem();
                bi3.ButtonIcon = "move.gif";
                bi3.ButtonName = "移动部门";
                bi3.ButtonPopedom = PopedomType.Edit;
                bi3.ButtonUrlType = UrlType.JavaScript;
                bi3.ButtonUrl = string.Format("sMove('{0}&datetime={1}')",GroupID,DateTime.Now);
                HeadMenuWebControls1.ButtonList.Add(bi3);
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {

            OrderByListItems_UniqueID = OrderByListItems.UniqueID.Replace("$","_");
            Button1.OnClientClick = string.Format("selectAll({0})", OrderByListItems_UniqueID);
            if (!Page.IsPostBack)
            {
                
                //AppName_Txt.Text = AppName;
                AppName = "应用列表->" + AppName;
                TabOptionItem1.Tab_Name = AppName;
                
                BindMenu();

                HeadMenuButtonItem m1 = new HeadMenuButtonItem();
                m1.ButtonName = "模块分类";
                m1.ButtonPopedom = PopedomType.New;
                m1.ButtonUrl = string.Format("moduleManager.aspx?CMD=New&S_ID={0}&ModuleId={1}",S_ID,0);
                HeadMenuWebControls1.ButtonList.Add(m1);

                //判断是否有排序权限
                if (!FrameWorkPermission.CheckButtonPermission(PopedomType.Orderby))
                    TabOptionItem2.Visible = false;
            }
            

            
        }
 private void BindButton()
 {
     HeadMenuButtonItem item0 = new HeadMenuButtonItem();
     item0.ButtonName = "角色资料";
     item0.ButtonIcon = "look.gif";
     item0.ButtonPopedom = PopedomType.List;
     item0.ButtonUrl = string.Format("RoleManager.aspx?RoleID={0}&CMD=Look", RoleID);
     HeadMenuWebControls1.ButtonList.Add(item0);
     if (CMD == "Look")
     {
         HeadMenuButtonItem item1 = new HeadMenuButtonItem();
         item1.ButtonName = "角色权限";
         item1.ButtonPopedom = PopedomType.Edit;
         item1.ButtonUrl = string.Format("?RoleID={0}&ApplicationID={1}&CMD=Edit", RoleID, ApplicationID);
         HeadMenuWebControls1.ButtonList.Add(item1);
     }
     if (CMD == "Edit")
     {
         ButtonTr_End.Visible = true;
         HeadMenuButtonItem item2 = new HeadMenuButtonItem();
         item2.ButtonName = "返回";
         item2.ButtonIcon = "back.gif";
         item2.ButtonPopedom = PopedomType.List;
         item2.ButtonUrl = "history.back(-1);";
         item2.ButtonUrlType = UrlType.JavaScript;
         HeadMenuWebControls1.ButtonList.Add(item2);
     }
 }
        private void SetMenu()
        {
            PermissionModuleName.Text = Title_Txt.Text = string.Format("{0}><a href='ModuleList.aspx?S_ID={3}&AppName={1}'>{1}</a>{2}", "<a href='List.aspx'>应用列表</a>", S_ID_Name, BusinessFacade.GetModuleTitle(ModuleID), S_ID);
            TabOptionItem1.Tab_Name = "应用模块管理-" + S_ID_Name + "->分类管理";
            HeadMenuWebControls1.HeadOPTxt = S_ID_Name;

            HeadMenuButtonItem m1 = new HeadMenuButtonItem();
            m1.ButtonPopedom = PopedomType.List;
            m1.ButtonName = S_ID_Name + "模块列表";
            m1.ButtonIcon = "list.gif";
            m1.ButtonUrl = string.Format("ModuleList.aspx?S_ID={0}&AppName={1}", S_ID, S_ID_Name);
            HeadMenuWebControls1.ButtonList.Add(m1);

            //判断是否生成增加子模块按钮
            if (CMD != "New" && ModuleID != 0)//&& SMT.M_OrderLevel.Substring(2, 2) == "00")
            {

                HeadMenuButtonItem m2 = new HeadMenuButtonItem();
                m2.ButtonName = "模块";
                m2.ButtonPopedom = PopedomType.New;
                m2.ButtonUrl = string.Format("?CMD=New&ModuleID={0}&S_ID={1}", ModuleID, S_ID);
                HeadMenuWebControls1.ButtonList.Add(m2);
            }

            //判断是否增加返回按钮
            if (!string.IsNullOrEmpty(CMD))
            {
                HeadMenuButtonItem m5 = new HeadMenuButtonItem();
                m5.ButtonIcon = "back.gif";
                m5.ButtonName = "返回";
                m5.ButtonPopedom = PopedomType.List;
                m5.ButtonUrl = string.Format("?ModuleID={0}&S_ID={1}", ModuleID, S_ID);
                HeadMenuWebControls1.ButtonList.Add(m5);
            }
        }
 /// <summary>
 /// 增加列表按钮
 /// </summary>
 private void AddListButton()
 {
     HeadMenuButtonItem bi = new HeadMenuButtonItem();
     bi.ButtonPopedom = PopedomType.List;
     bi.ButtonName = "功能检定点模板";
     bi.ButtonUrl = string.Format("DefaultPoint.aspx?CMD=List&FunctionID={0}&DeviceID={1}", FunctionID, DeviceID);
     HeadMenuWebControls1.ButtonList.Add(bi);
 }
 /// <summary>
 /// 增加增加按钮
 /// </summary>
 private void AddNewButton()
 {
     HeadMenuButtonItem bi = new HeadMenuButtonItem();
     bi.ButtonPopedom = PopedomType.New;
     bi.ButtonName = "设备功能";
     bi.ButtonUrl = string.Format("ManagerFunction.aspx?CMD=New&DeviceID={0}", DeviceID);
     HeadMenuWebControls1.ButtonList.Add(bi);
 }
 private void AddBackButton()
 {
     HeadMenuButtonItem bi = new HeadMenuButtonItem();
     bi.ButtonPopedom = PopedomType.List;
     bi.ButtonName = "设备";
     bi.ButtonUrl = "Default.aspx";
     HeadMenuWebControls1.ButtonList.Add(bi);
 }
        private void OnStart()
        {

            InputData();
            switch (CMD)
            {
                case "New":
                    CMD_Txt = "增加";
                    HiddenDisp();
                    TopTr.Visible = false;
                    break;
                case "Edit":
                    CMD_Txt = "修改";
                    HiddenDisp();
                    HeadMenuButtonItem Bm0 = new HeadMenuButtonItem();
                    Bm0.ButtonPopedom = PopedomType.List;
                    Bm0.ButtonUrl = string.Format("?CMD=Look&S_ID={0}", S_ID);
                    Bm0.ButtonIcon = "back.gif";
                    Bm0.ButtonName = "返回";
                    HeadMenuWebControls1.ButtonList.Add(Bm0);
                    HeadMenuButtonItem Bm1 = new HeadMenuButtonItem();
                    Bm1.ButtonPopedom = PopedomType.Delete;
                    Bm1.ButtonUrlType = UrlType.JavaScript;
                    Bm1.ButtonUrl = string.Format("DelData('?CMD=Delete&S_ID={0}')", S_ID);
                    HeadMenuWebControls1.ButtonList.Add(Bm1);
                    break;
                case "Look":
                    HiddenInput();
                    HeadMenuButtonItem Bm2 = new HeadMenuButtonItem();
                    Bm2.ButtonPopedom = PopedomType.Edit;
                    Bm2.ButtonUrl = string.Format("?CMD=Edit&S_ID={0}", S_ID);
                    HeadMenuWebControls1.ButtonList.Add(Bm2);
                    break;
                case "Delete":
                    CMD_Txt = "删除";
                    sys_ApplicationsTable sat = new sys_ApplicationsTable();
                    sat.ApplicationID = S_ID;
                    sat.DB_Option_Action_ = CMD;
                    if (sat.ApplicationID != 1)
                    {
                        //删除应用表
                        BusinessFacade.sys_ApplicationsInsertUpdate(sat);
                        //删除模块表
                        BusinessFacade.sys_Module_DeleteFormAppID(S_ID);
                        //删除角色应用权限表
                        BusinessFacade.sys_RolePermission_DeleteFromAppid(S_ID);
                        //删除角色应用表
                        BusinessFacade.sys_RoleApplication_DeleteFormAppid(S_ID);
                        
                    }
                    EventMessage.MessageBox(1, "操作成功", "删除记录ID:(" + S_ID + ")成功!", Icon_Type.OK, Common.GetHomeBaseUrl("list.aspx"));
                    break;
            }
            All_Title_Txt = CMD_Txt + App_Txt;
            HeadMenuWebControls1.HeadOPTxt = TabOptionItem1.Tab_Name = All_Title_Txt;
            //Button1.Attributes.Add("Onclick", "javascript:return checkForm(aspnetForm);");
            
        }
 private void AddByTemplateButton()
 {
     HeadMenuButtonItem bi = new HeadMenuButtonItem();
     bi.ButtonPopedom = PopedomType.New;
     bi.ButtonUrlType = UrlType.JavaScript;
     bi.ButtonName = "通过选择模板创建";
     bi.ButtonUrl = "javascript:showPopWin('选择模板创建设备','AddByDeviceTemplate.aspx?CMD=New&rand'+rand(100000000),700, 420, AlertMessageBox,true)";
     HeadMenuWebControls1.ButtonList.Add(bi);
 }
Beispiel #10
0
 private void OnBindButton()
 {
     HeadMenuButtonItem bi0 = new HeadMenuButtonItem();
     bi0.ButtonIcon = "back.gif";
     bi0.ButtonName = "����";
     bi0.ButtonPopedom = PopedomType.List;
     bi0.ButtonUrl = string.Format("GroupList.aspx?GroupID={0}", GroupID);
     HeadMenuWebControls1.ButtonList.Add(bi0);
 }
 private void AddBackButton()
 {
     HeadMenuButtonItem bi = new HeadMenuButtonItem();
     bi.ButtonPopedom = PopedomType.List;
     bi.ButtonName = "设备检测";
     bi.ButtonUrlType = UrlType.JavaScript;
     bi.ButtonUrl = "javascript:BackToDefaultPage();";
     HeadMenuWebControls1.ButtonList.Add(bi);
 }
Beispiel #12
0
 /// <summary>
 /// 绑定返回按钮(直接复制)
 /// </summary>
 private void BindButton()
 {
     HeadMenuButtonItem bi0 = new HeadMenuButtonItem();
     bi0.ButtonIcon = "back.gif";
     bi0.ButtonName = "返回";
     bi0.ButtonPopedom = PopedomType.List;
     bi0.ButtonUrl = string.Format("default.aspx");
     HeadMenuWebControls1.ButtonList.Add(bi0);
 }
        /// <summary>
        /// 增加增加按钮
        /// </summary>
        private void AddNewButton()
        {
            HeadMenuButtonItem bi = new HeadMenuButtonItem();
            bi.ButtonPopedom = PopedomType.New;
            bi.ButtonName = "功能检定点";
            bi.ButtonUrl = string.Format("ManagerPoint.aspx?CMD=New&FunctionID={0}&DeviceID={1}", FunctionID, DeviceID);
            HeadMenuWebControls1.ButtonList.Add(bi);

            bi = new HeadMenuButtonItem();
            bi.ButtonPopedom = PopedomType.New;
            bi.ButtonUrlType = UrlType.JavaScript;
            bi.ButtonName = "通过模板创建";
            bi.ButtonUrl = "javascript:showPopWin('选择模板创建功能检定点','AddByPointTemplate.aspx?CMD=New&FunctionID=" + FunctionID + "&rand'+rand(100000000),700, 420, AlertMessageBox,true)";
            HeadMenuWebControls1.ButtonList.Add(bi);
        }
Beispiel #14
0
        private void BindButton()
        {
            HeadMenuButtonItem bi1 = new HeadMenuButtonItem();
            bi1.ButtonPopedom = PopedomType.Delete;
            bi1.ButtonUrl = string.Format("DelData('?CMD=Delete&GroupID={0}')", GroupID);
            bi1.ButtonUrlType = UrlType.JavaScript;
            HeadMenuWebControls1.ButtonList.Add(bi1);

            HeadMenuButtonItem bi0 = new HeadMenuButtonItem();
            bi0.ButtonIcon = "back.gif";
            bi0.ButtonName = "����";
            bi0.ButtonPopedom = PopedomType.List;
            bi0.ButtonUrl = string.Format("GroupList.aspx?GroupID={0}", GroupID);
            HeadMenuWebControls1.ButtonList.Add(bi0);
        }
        private void ButtonBind()
        {
            try
            {

                int parent = 0;
                if (DictionaryID != 0)
                { 
                    T_DataDictionaryEntity dataDictionary = new T_DataDictionaryEntity();
                    dataDictionary = BusinessFacadeShanliTech_HLD_Business.T_DataDictionaryDisp(DictionaryID);
                    parent = dataDictionary.parent;
                }
                if (parent == 0)
                {
                    HeadMenuButtonItem bi0 = new HeadMenuButtonItem();
                    bi0.ButtonPopedom = PopedomType.New;
                    bi0.ButtonName = "字典";
                    bi0.ButtonUrl = string.Format("Manager.aspx?CMD=New&IDX={0}", DictionaryID);
                    HeadMenuWebControls1.ButtonList.Add(bi0);
                }

                if (DictionaryID != 0)
                {
                    HeadMenuButtonItem bi2 = new HeadMenuButtonItem();
                    bi2.ButtonPopedom = PopedomType.Edit;
                    bi2.ButtonName = "字典";
                    bi2.ButtonUrl = string.Format("Manager.aspx?CMD=Edit&IDX={0}", DictionaryID);
                    HeadMenuWebControls1.ButtonList.Add(bi2);

                   
                }
            }
            catch (Exception ex)
            {

                Console.WriteLine("获取数据字典出错"+ex.Message);
            }

          
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            FrameWorkPermission.CheckPagePermission(CMD);   
            if (!Page.IsPostBack)
            {
                FileLogList.DataSource = FileTxtLogs.GetFileList();
                FileLogList.DataTextField = "Value";
                FileLogList.DataValueField = "Value";
                FileLogList.DataBind();
                BindDate();

            }
            if (FileLogList.Items.Count != 0)
            {
                HeadMenuButtonItem item0 = new HeadMenuButtonItem();
                item0.ButtonName = "当前日志文件";
                item0.ButtonPopedom = PopedomType.Delete;
                item0.ButtonUrlType = UrlType.JavaScript;
                item0.ButtonUrl = "DelData('?CMD=Delete');";
                HeadMenuWebControls1.ButtonList.Add(item0);
            }
            if (CMD == "Delete")
                DeleteFile();
        }
Beispiel #17
0
        /// <summary>
        /// ��ʼ��
        /// </summary>
        private void OnStart()
        {
            sys_UserTable ut = BusinessFacade.sys_UserDisp(UserID);
            OnStartData(ut);
            if (CMD == "List")
            {
                DispTr.Visible = true;
                HeadMenuButtonItem bi1 = new HeadMenuButtonItem();
                bi1.ButtonPopedom = PopedomType.Edit;
                bi1.ButtonName = "�û�";
                bi1.ButtonUrl = string.Format("?CMD=Edit&UserID={0}", UserID);
                HeadMenuWebControls1.ButtonList.Add(bi1);

                Hidden_Input();
                PostButton.Visible = false;

            }
            else if (CMD == "New")
            {
                Hidden_Disp();
            }
            else if (CMD == "Edit")
            {
                Hidden_Disp();
                HeadMenuButtonItem bi5 = new HeadMenuButtonItem();
                bi5.ButtonIcon = "back.gif";
                bi5.ButtonPopedom = PopedomType.List;
                bi5.ButtonName = "����";
                bi5.ButtonUrl = string.Format("?CMD=List&UserID={0}", UserID);
                HeadMenuWebControls1.ButtonList.Add(bi5);

                HeadMenuButtonItem bi2 = new HeadMenuButtonItem();
                bi2.ButtonPopedom = PopedomType.Delete;
                bi2.ButtonName = "�û�";
                bi2.ButtonUrlType = UrlType.JavaScript;
                bi2.ButtonUrl = string.Format("DelData('?CMD=Delete&UserID={0}')", UserID);
                HeadMenuWebControls1.ButtonList.Add(bi2);
                U_LoginName.Visible = false;
                U_LoginName_Value.Visible = true;

            }
            else if (CMD == "Delete")
            {
                //Admin�ʺŲ��ܱ�ɾ��
                if ((ut.UserID != 1))
                {
                    if (ut.U_Type == 0 && UserData.GetUserDate.U_Type == 1)
                    {
                        EventMessage.MessageBox(1, "������Ч", "��ͨ�û��޷�ɾ�������û�����!", Icon_Type.Error, Common.GetHomeBaseUrl("default.aspx"));
                    }
                    //ut.DB_Option_Action_ = "Delete";
                    //BusinessFacade.sys_UserInsertUpdate(ut);
                    //�����û�ɾ����ʶ
                    BusinessFacade.Update_Table_Fileds("sys_User", "U_Status=2", string.Format("UserID={0}", UserID));
                    ArrayList lst = BusinessFacade.sys_UserRolesDisp(UserID);
                    foreach (sys_UserRolesTable var in lst)
                    {
                        var.DB_Option_Action_ = "Delete";
                        BusinessFacade.sys_UserRolesInsertUpdate(var);
                    }

                    if (ut.U_PhotoUrl != "")
                    {
                        FileUpLoadCommon.DeleteFile(string.Format("{0}{1}{2}", Common.UpLoadDir, "UserPhoto/", ut.U_PhotoUrl));
                        FileUpLoadCommon.DeleteFile(string.Format("{0}{1}s_{2}", Common.UpLoadDir, "UserPhoto/", ut.U_PhotoUrl));
                    }
                    //�ӻ������Ƴ��û�
                    UserData.MoveUserCache(UserID);
                    //�������б����Ƴ�
                    FrameWorkPermission.UserOnlineList.RemoveUserName(ut.U_LoginName.ToLower());
                }
                EventMessage.MessageBox(1, "�����ɹ�", string.Format("{1}ID({0})�ɹ�!", UserID, "ɾ���û�"), Icon_Type.OK, Common.GetHomeBaseUrl("default.aspx"));

            }
        }
 /// <summary>
 /// 绑定返回按钮(直接复制)
 /// </summary>
 private void BindButton()
 {
     HeadMenuButtonItem bi0 = new HeadMenuButtonItem();
     bi0.ButtonIcon = "back.gif";
     bi0.ButtonName = "返回";
     bi0.ButtonPopedom = PopedomType.List;
     if(UserID == 0 && ConsultationID != 0)
     {
         Maticsoft.BLL.record_Consultation bll = new Maticsoft.BLL.record_Consultation();
         Maticsoft.Model.record_Consultation model = bll.GetModel(ConsultationID);
         UserID = model.C_UserID;
     }
     bi0.ButtonUrl = string.Format("ConsultationList.aspx?UserID={0}", UserID);
     HeadMenuWebControls1.ButtonList.Add(bi0);
 }
        /// <summary>
        /// 初始化
        /// </summary>
        private void OnStart()
        {
            if (CMD == "New")
            {
                this.C_UserID_Txt.Text = getUserModelById(UserID).U_IDCard;
                this.C_Time.Text = DateTime.Now.ToShortDateString();
            }
            else if (CMD == "Edit")
            {
                HeadMenuButtonItem bi2 = new HeadMenuButtonItem();
                bi2.ButtonPopedom = PopedomType.Delete;
                bi2.ButtonName = "会诊记录";
                bi2.ButtonUrlType = UrlType.JavaScript;
                bi2.ButtonUrl = string.Format("DelData('?CMD=Delete&ConsultationID={0}')", ConsultationID);
                HeadMenuWebControls1.ButtonList.Add(bi2);

                InputData();
            }
            else if (CMD == "Delete")
            {
                Maticsoft.BLL.record_Consultation bll = new Maticsoft.BLL.record_Consultation();
                Maticsoft.Model.record_Consultation model = bll.GetModel(ConsultationID);
                bll.Delete(model.ConsultationID);
                EventMessage.MessageBox(1, "操作成功", string.Format("{1}ID({0})成功!", ConsultationID, "删除信息"), Icon_Type.OK, Common.GetHomeBaseUrl("ConsultationList.aspx?UserID=" + UserID));
            }
        }
Beispiel #20
0
        /// <summary>
        /// 初始化
        /// </summary>
        private void OnStart()
        {
            if (CMD == "New")
            {
            }
            else if (CMD == "Edit")
            {
                HeadMenuButtonItem bi2 = new HeadMenuButtonItem();
                bi2.ButtonPopedom = PopedomType.Delete;
                bi2.ButtonName = "巡查";  //需要改
                bi2.ButtonUrlType = UrlType.JavaScript;
                bi2.ButtonUrl = string.Format("DelData('?CMD=Delete&InspectID={0}')", InspectID);
                HeadMenuWebControls1.ButtonList.Add(bi2);

                InputData();
            }
            else if (CMD == "Delete")
            {
                Maticsoft.BLL.supervision_Inspect bll = new Maticsoft.BLL.supervision_Inspect();
                Maticsoft.Model.supervision_Inspect model = bll.GetModel(InspectID);
                bll.Delete(model.InspectID);
                EventMessage.MessageBox(1, "操作成功", string.Format("{1}ID({0})成功!", InspectID, "删除信息"), Icon_Type.OK, Common.GetHomeBaseUrl("default.aspx"));
            }
        }
Beispiel #21
0
        /// <summary>
        /// 初始化
        /// </summary>
        private void OnStart()
        {
            if (CMD == "New")
            {
                Button1.Visible = true;
                Button2.Visible = false;
            }
            else if (CMD == "Edit")
            {
                HeadMenuButtonItem bi2 = new HeadMenuButtonItem();
                bi2.ButtonPopedom = PopedomType.Delete;
                bi2.ButtonName = "活动";
                bi2.ButtonUrlType = UrlType.JavaScript;
                bi2.ButtonUrl = string.Format("DelData('?CMD=Delete&ReportID={0}')", ReportID);
                HeadMenuWebControls1.ButtonList.Add(bi2);

                InputData();
            }
            else if (CMD == "Delete")
            {
                Maticsoft.BLL.AR_Report bll = new Maticsoft.BLL.AR_Report();
                Maticsoft.Model.AR_Report model = bll.GetModel(ReportID);
                bll.Delete(model.ReportID);
                EventMessage.MessageBox(1, "操作成功", string.Format("{1}ID({0})成功!", ReportID, "删除信息"), Icon_Type.OK, Common.GetHomeBaseUrl("default.aspx"));
            }
        }
Beispiel #22
0
        /// <summary>
        /// 初始化
        /// </summary>
        private void OnStart()
        {
            if (CMD == "New")
            {
            }
            else if (CMD == "Edit")
            {
                HeadMenuButtonItem bi2 = new HeadMenuButtonItem();
                bi2.ButtonPopedom = PopedomType.Delete;
                bi2.ButtonName = "家庭健康档案";  //需要改
                bi2.ButtonUrlType = UrlType.JavaScript;
                bi2.ButtonUrl = string.Format("DelData('?CMD=Delete&FamilyID={0}')", FamilyID);
                HeadMenuWebControls1.ButtonList.Add(bi2);

                InputData();
            }
            else if (CMD == "Delete")
            {
            Maticsoft.BLL.record_FamilyBaseInfo bll = new Maticsoft.BLL.record_FamilyBaseInfo();
                Maticsoft.Model.record_FamilyBaseInfo model = bll.GetModel(FamilyID);
                //bll执行删除操作,参数是这个实体类的ID值
                bll.Delete(model.FamilyID);
                Maticsoft.BLL.record_FamilyProblem record_FamilyProblem_bll = new Maticsoft.BLL.record_FamilyProblem();
                record_FamilyProblem_bll.Delete(model.FamilyID);
                //以下方法的第4、5个参数需要更改
                EventMessage.MessageBox(1, "操作成功", string.Format("{1}ID({0})成功!", FamilyID, "删除信息"), Icon_Type.OK, Common.GetHomeBaseUrl("default.aspx"));
            }
        }
Beispiel #23
0
        /// <summary>
        /// 初始化
        /// </summary>
        private void OnStart()
        {
            if (CMD == "New")
            {

            }
            else if (CMD == "Edit")
            {
                HeadMenuButtonItem bi2 = new HeadMenuButtonItem();
                bi2.ButtonPopedom = PopedomType.Delete;
                bi2.ButtonUrlType = UrlType.JavaScript;
                bi2.ButtonUrl = string.Format("DelData('?CMD=Delete&DocumentID={0}')", DocumentID);
                HeadMenuWebControls1.ButtonList.Add(bi2);

                InputData();
            }
            else if (CMD == "Delete")
            {
                Maticsoft.BLL.education_Document bll = new Maticsoft.BLL.education_Document();
                Maticsoft.Model.education_Document model = bll.GetModel(DocumentID);
                bll.Delete(model.DocumentID);
                if (model.D_Url != "")
                    File.Delete(Server.MapPath("~/") + "Manager\\Public\\Document\\" + model.D_Url); //删除本地文件
                EventMessage.MessageBox(1, "操作成功", string.Format("{1}ID({0})成功!", DocumentID, "删除信息"), Icon_Type.OK, Common.GetHomeBaseUrl("default.aspx"));
            }
        }
 private void ButtonNew()
 {
     HeadMenuButtonItem bi1 = new HeadMenuButtonItem();
     bi1.ButtonPopedom = PopedomType.List;
     bi1.ButtonIcon = "back.gif";
     bi1.ButtonName = "返回";
     bi1.ButtonUrl = string.Format("Default.aspx?ID={0}", IDX);
     HeadMenuWebControls1.ButtonList.Add(bi1);
 }
        /// <summary>
        /// 增加删除按钮
        /// </summary>
        private void AddDeleteButton()
        {
            HeadMenuButtonItem bi = new HeadMenuButtonItem();
            bi.ButtonPopedom = PopedomType.Delete;
            bi.ButtonName = "设备检测";
            bi.ButtonUrlType = UrlType.JavaScript;
            bi.ButtonUrl = string.Format("DelData('?CMD=Delete&IDX={0}')", IDX);
            HeadMenuWebControls1.ButtonList.Add(bi);

            HeadMenuButtonItem bi1 = new HeadMenuButtonItem();
            bi1.ButtonPopedom = PopedomType.List;
            bi1.ButtonIcon = "back.gif";
            bi1.ButtonName = "返回";
            bi1.ButtonUrl = string.Format("?CMD=List&IDX={0}", IDX);
            HeadMenuWebControls1.ButtonList.Add(bi1);
        }
        private void OnStart()
        {
            if (FrameWorkMenuTree.GetModuleLevel(ModuleID) >= 3)
            {
                MessageLit.Text = "<font color=red>以下模块超过3层,只有当菜单样式为\"多级菜单\"才能正常显示出来!</font>";
            }

            if (CMD == string.Empty)
            {
                //TabOptionWebControls1.SelectIndex = 1;
                TabOptionItem3.Visible = true;
            }

            //填充数据
            sys_ModuleTable SMT = new sys_ModuleTable();
            SMT = BusinessFacade.sys_ModuleDisp(ModuleID);
            this.M_ApplicationID_Txt.Text = S_ID_Name;
            if (ModuleID == 0)
                this.M_PageCode.Text = SMT.M_PageCode;
            if (CMD == "New" && ModuleID != 0)
            {
                this.M_ParentID_Txt.Text = SMT.M_CName + "(" + SMT.M_PageCode + ")";
            }
            else
            {
                this.M_ParentID_Txt.Text = SMT.M_ParentID == 0 ? "无" : BusinessFacade.sys_ModuleDisp(SMT.M_ParentID).M_CName;
            }
            this.M_PageCode_Txt.Text = SMT.M_PageCode;
            this.M_CName_Txt.Text = SMT.M_CName;
            this.M_Directory_Txt.Text = SMT.M_Directory;
            this.M_IsSystem_Txt.Text = SMT.M_IsSystem == 0 ? "否" : "是";
            this.M_Close_Txt.Text = SMT.M_Close == 0 ? "否" : "是";
            this.M_Icon_Txt.Text = SMT.M_Icon;

            if (CMD == "Edit")
            {
                this.M_PageCode.Text = SMT.M_PageCode;
                this.M_CName.Text = SMT.M_CName;
                this.M_Directory.Text = SMT.M_Directory;
                this.M_Icon.Text = SMT.M_Icon;
                ListItem ditem1 = this.M_IsSystem.Items.FindByValue(SMT.M_IsSystem.ToString());
                if (ditem1 != null)
                    ditem1.Selected = true;
                ListItem ditem2 = this.M_Close.Items.FindByValue(SMT.M_Close.ToString());
                if (ditem2 != null)
                    ditem2.Selected = true;
            }

            //绑定子模块
            QueryParam qp = new QueryParam();
            qp.Orderfld = " M_Applicationid,M_OrderLevel ";
            qp.OrderType = 0;
            qp.Where = string.Format("Where M_ParentID={0} and M_Applicationid={1}", ModuleID, S_ID);
            int RecordCount = 0;
            ArrayList lst = BusinessFacade.sys_ModuleList(qp, out RecordCount);
            GridView1.DataSource = lst;
            GridView1.DataBind();

            //绑定排序
            OrderByListItems.DataSource = lst;
            OrderByListItems.DataTextField = "M_CName";
            OrderByListItems.DataValueField = "ModuleID";
            OrderByListItems.DataBind();
            if (lst.Count > 0)
                OrderByListItems.Rows = lst.Count;

            //判断是否隐藏数据
            if (CMD == "New" || CMD == "Edit")
                HiddenDisp();
            else
            {
                HiddenInput();
                SubmitTr.Visible = false;
            }



            //if (ModuleID !=0 && SMT.M_OrderLevel.Substring(2, 2) != "00")
            //{
            //    TabOptionWebControls1.SelectIndex = 0;
            //    TabOptionItem2.Visible = false;
            //    TabOptionItem3.Visible = false;

            //    if (CMD!="New" && CMD!="Edit")
            //        TabOptionItem4.Visible = true;

            //    BindPermissionList();
            //    if (CMD == "Edit")
            //    {
            //        HeadMenuButtonItem m5 = new HeadMenuButtonItem();
            //        m5.ButtonIcon = "back.gif";
            //        m5.ButtonName = "返回";
            //        m5.ButtonPopedom = PopedomType.List;
            //        m5.ButtonUrl = string.Format("?ModuleID={0}&S_ID={1}", ModuleID, S_ID);
            //        HeadMenuWebControls1.ButtonList.Add(m5);
            //    }
            //}




            //生成修改按钮
            if (ModuleID != 0 && CMD == "")
            {
                HeadMenuButtonItem m3 = new HeadMenuButtonItem();
                m3.ButtonName = "模块";
                m3.ButtonPopedom = PopedomType.Edit;
                m3.ButtonUrl = string.Format("?CMD=Edit&ModuleID={0}&S_ID={1}", ModuleID, S_ID);
                HeadMenuWebControls1.ButtonList.Add(m3);

                
                //if (FrameWorkMenuTree.CheckModuleLastLevel(ModuleID))
                if (BusinessFacade.GetSuBCount(ModuleID)==0)
                {
                    HeadMenuButtonItem m6 = new HeadMenuButtonItem();
                    m6.ButtonName = "设定模块扩展权限";
                    m6.ButtonIcon = "b.gif";
                    m6.ButtonPopedom = PopedomType.Edit;
                    m6.ButtonUrl = string.Format("?CMD=ExtPermission&ModuleID={0}&S_ID={1}", ModuleID, S_ID);
                    HeadMenuWebControls1.ButtonList.Add(m6);
                }
            }

            //生成删除按钮
            if (CMD == "Edit")
            {
                HeadMenuButtonItem m4 = new HeadMenuButtonItem();
                m4.ButtonPopedom = PopedomType.Delete;
                m4.ButtonUrl = string.Format("DelData('?CMD=Delete&S_ID={0}&ModuleID={1}')", S_ID, ModuleID);
                m4.ButtonUrlType = UrlType.JavaScript;
                HeadMenuWebControls1.ButtonList.Add(m4);
            }

            //判断是否执行删除
            if (CMD == "Delete")
            {
                SMT.DB_Option_Action_ = "Delete";
                if (SMT.M_IsSystem != 1)
                {
                    BusinessFacade.DeleteModule(ModuleID);

                }
                sys_Module_Cache.ReLoadCache(); //重新加载模块缓存
                EventMessage.MessageBox(1, "操作成功", "删除记录ID:(" + ModuleID + ")成功!", Icon_Type.OK, Common.GetHomeBaseUrl(string.Format("ModuleList.aspx?S_ID={0}&AppName={1}", S_ID, S_ID_Name)));
            }

            //Button1.Attributes.Add("Onclick", "javascript:return checkForm(aspnetForm);");



            if (CMD == "ExtPermission")
            {
                TabOptionItem2.Visible = false;
                TabOptionItem4.Visible = true;
                TabOptionWebControls1.SelectIndex = 3;
                BindPermissionList();
            }
        }
        private void OnStart()
        {
            sys_FieldTable Ft = BusinessFacade.sys_FieldDisp(FieldID);
            F_Key_Txt.Text = Ft.F_Key;
            F_CName_Txt.Text = Ft.F_CName;
            F_Remark_Txt.Text = Ft.F_Remark;

            QueryParam qp = new QueryParam();
            qp.Where = string.Format("where V_F_Key = '{0}'", Common.inSQL(Ft.F_Key));
            qp.Orderfld = " V_ShowOrder ";
            qp.OrderType = 0;
            int RecordCount = 0;
            ArrayList lst = BusinessFacade.sys_FieldValueList(qp, out RecordCount);
            Main_Value.DataSource = lst;
            Main_Value.DataBind();

            if (CMD == "List")
            {
                HeadMenuButtonItem bi1 = new HeadMenuButtonItem();
                bi1.ButtonPopedom = PopedomType.Edit;
                bi1.ButtonName = "Ӧ���ֶ�";
                bi1.ButtonUrl = string.Format("?CMD=Edit&FieldID={0}", FieldID);
                HeadMenuWebControls1.ButtonList.Add(bi1);

                HeadMenuButtonItem bi3 = new HeadMenuButtonItem();
                bi3.ButtonPopedom = PopedomType.New;
                bi3.ButtonName = "Ӧ���ֶ�ֵ";
                bi3.ButtonUrl = string.Format("showPopWin('Ӧ���ֶ�ֵ����','FieldValueBox.aspx?FieldID={0}&CMD=New&{1}', 300, 160, AlertMessageBox,true);", FieldID, Common.RndNum(7));
                bi3.ButtonUrlType = UrlType.JavaScript;
                HeadMenuWebControls1.ButtonList.Add(bi3);

                HeadMenuButtonItem bi4 = new HeadMenuButtonItem();
                bi4.ButtonPopedom = PopedomType.Edit;
                bi4.ButtonName = "����Ӧ���ֶ�ֵ";
                bi4.ButtonIcon = "Orderby.gif";
                bi4.ButtonUrl = string.Format("showPopWin('Ӧ���ֶ�ֵ����','FieldValueBox.aspx?F_Key={0}&CMD=OrderBy&{1}', 180, 210, AlertMessageBox,true);", Ft.F_Key, Common.RndNum(7));
                bi4.ButtonUrlType = UrlType.JavaScript;
                HeadMenuWebControls1.ButtonList.Add(bi4);
                Disp_Input.Visible = false;

                F_Key_Txt.Visible = true;
                F_CName_Txt.Visible = true;
                F_Remark_Txt.Visible = true;
                F_Key.Visible = false;
                F_CName.Visible = false;
                F_Remark.Visible = false;
            }
            else if (CMD == "Edit")
            {
                F_Key.Text = Ft.F_Key;
                F_CName.Text = Ft.F_CName;
                F_Remark.Text = Ft.F_Remark;

                F_Key.Visible = false;
                F_Key_Txt.Visible = true;

                HeadMenuButtonItem bi5 = new HeadMenuButtonItem();
                bi5.ButtonIcon = "back.gif";
                bi5.ButtonPopedom = PopedomType.List;
                bi5.ButtonName = "����";
                bi5.ButtonUrl = string.Format("?CMD=List&FieldID={0}", FieldID);
                HeadMenuWebControls1.ButtonList.Add(bi5);

                HeadMenuButtonItem bi2 = new HeadMenuButtonItem();
                bi2.ButtonPopedom = PopedomType.Delete;
                bi2.ButtonName = "Ӧ���ֶ�";
                bi2.ButtonUrlType = UrlType.JavaScript;
                bi2.ButtonUrl = string.Format("DelData('?CMD=Delete&FieldID={0}')", FieldID);
                HeadMenuWebControls1.ButtonList.Add(bi2);

                Disp_Sub.Visible = false;
            }
            else if (CMD == "New")
            {
                Disp_Sub.Visible = false;
            }
            else if (CMD == "Delete")
            {

                Ft.DB_Option_Action_ = "Delete";
                BusinessFacade.sys_FieldInsertUpdate(Ft);

                foreach (sys_FieldValueTable var in lst)
                {
                    var.DB_Option_Action_ = "Delete";
                    BusinessFacade.sys_FieldValueInsertUpdate(var);
                }
                EventMessage.MessageBox(1, "�����ɹ�", string.Format("{1}ID({0})�ɹ�!", FieldID, "ɾ��Ӧ���ֶ�"), Icon_Type.OK, Common.GetHomeBaseUrl("default.aspx"));

            }
        }
Beispiel #28
0
        /// <summary>
        /// 初始化
        /// </summary>
        private void OnStart()
        {
            if (CMD == "New")
            {
                HiddenDisp();
            }
            else if (CMD == "Edit")
            {
                HeadMenuButtonItem bi2 = new HeadMenuButtonItem();
                bi2.ButtonPopedom = PopedomType.Delete;
                bi2.ButtonName = "信息";  //需要改
                bi2.ButtonUrlType = UrlType.JavaScript;
                bi2.ButtonUrl = string.Format("DelData('?CMD=Delete&InfoID={0}')", InfoID);
                HeadMenuWebControls1.ButtonList.Add(bi2);

                HiddenDisp();
                InputData();
            }
            else if (CMD == "Delete")
            {
                //这是操作数据库的核心代码,工作原理是:首先要明确现在所操作的模块对应着数据库中的哪张表,然后创建这个表所对应的的逻辑处理层(bll)对象,如这里操作的表是supervision_Info,则要新建所对应的Maticsoft.BLL.supervision_Info对象
                Maticsoft.BLL.supervision_Info bll = new Maticsoft.BLL.supervision_Info();
                //这是数据库实体类对象(简单来说就对应着这个表的一条记录),因为这里操作的表是supervision_Info,则对应的model是Maticsoft.Model.supervision_Info,然后通过上一行new的bll对象去执行数据库操作(这里使用的方法是GetModel,当然还有其他的方法,根据需要使用不同的方法),返回对应实体类对象
                Maticsoft.Model.supervision_Info model = bll.GetModel(InfoID);
                //bll执行删除操作,参数是这个实体类的ID值
                bll.Delete(model.InfoID);
                //以下方法的第4、5个参数需要更改
                EventMessage.MessageBox(1, "操作成功", string.Format("{1}ID({0})成功!", InfoID, "删除信息"), Icon_Type.OK, Common.GetHomeBaseUrl("default.aspx"));
            }
        }
 /// <summary>
 /// 增加修改按钮
 /// </summary>
 private void AddEditButton()
 {
     HeadMenuButtonItem bi = new HeadMenuButtonItem();
     bi.ButtonPopedom = PopedomType.Edit;
     bi.ButtonName = "设备检测";
     bi.ButtonUrl = string.Format("?CMD=Edit&IDX={0}", IDX);
     HeadMenuWebControls1.ButtonList.Add(bi);
 }
 private void AddSaveUpdateButton()
 {
     HeadMenuButtonItem bi = new HeadMenuButtonItem();
     bi.ButtonPopedom = PopedomType.Edit;
     bi.ButtonName = "提交保存修改";
     bi.ButtonIcon = "disk.png";
     bi.ButtonUrlType = UrlType.JavaScript;
     bi.ButtonUrl = "javascript:BackToDefaultPage();";
     HeadMenuWebControls1.ButtonList.Add(bi);
 }