コード例 #1
0
        public bool onidDeletes(string name, string U_IDs, HttpContext context)
        {
            bool result = false;

            try
            {
                string   enterpriseCode = Common.GetSessionValue("EnterpriseCode", context);
                string[] strs           = U_IDs.Split(',');
                string[] names          = name.Split(',');
                for (int i = 0; i < strs.Length; i++)
                {
                    WebPages.RecycleBinService.RecycleBinModel model = new RecycleBinService.RecycleBinModel();
                    model.RBTitle           = "删除用户-" + names[i] + ""; //标题
                    model.RBModularID       = 12;                      //对应模块权限ID
                    model.RBTableName       = "U_UserInfo";            //删除的表名
                    model.RBFieldName       = "U_ID";                  //删除相对应字段的id
                    model.RBFieldValue      = strs[i].ToString();      //删除列名的id
                    model.RBDeleteFieldName = "U_Mark_Delete";         //表的删除字段一般 某某某_Delete
                    model.RBDeleteTime      = DateTime.Now;
                    model.EnterpriseCode    = enterpriseCode;
                    model.RBExcutePerson    = Common.GetSessionValue("loginName", context);
                    if (model.RBExcutePerson == null)
                    {
                        return(false);
                    }
                    result = MgrServices.RecycleBinService.PutDataInRecycleBin(model);
                }
                return(result);
            }
            catch (Exception ex)
            {
                return(false);
            }
        }
コード例 #2
0
        public void DelAmount(string Acode, int Aid, string Aname, HttpContext context)
        {
            int result = 0;

            try
            {
                string enterpriseCode = Common.GetSessionValue("EnterpriseCode", context);
                CrisisInterfere.RecycleBinService.RecycleBinModel model = new RecycleBinService.RecycleBinModel();
                model.RBTitle           = "删除量表管理-" + Aname; //标题
                model.RBModularID       = 14;                //对应模块权限ID
                model.RBTableName       = "Amount_Info";     //删除的表名
                model.RBFieldName       = "Amount_ID";       //删除相对应字段的id
                model.RBFieldValue      = Aid.ToString();    //删除列名的id
                model.RBDeleteFieldName = "Is_Delete";       //表的删除字段一般 某某某_Delete
                model.RBDeleteTime      = DateTime.Now;
                model.EnterpriseCode    = enterpriseCode;
                model.RBExcutePerson    = Common.GetSessionValue("loginName", context);
                if (model.RBExcutePerson == null)
                {
                    context.Response.Write(result);
                    return;
                }
                result = MgrServices.RecycleBinService.PutDataInRecycleBin(model) == true ? 1 : 0;
                //int result = MgrServices.AmountService.DisplayAmount(Acode);
                context.Response.Write(result);
            }
            catch
            {
                context.Response.Write(result);
            }
        }
コード例 #3
0
        /// <summary>
        /// 将数据放回回收站
        /// </summary>
        /// <param name="U_ID"></param>
        /// <param name="context"></param>
        /// <returns></returns>

        public bool idDelete(int U_ID, HttpContext context)
        {
            try
            {
                var    name           = context.Request["name"].ToString();
                string enterpriseCode = Common.GetSessionValue("EnterpriseCode", context);
                WebPages.RecycleBinService.RecycleBinModel model = new RecycleBinService.RecycleBinModel();
                model.RBTitle           = "删除用户-" + name + ""; //标题
                model.RBModularID       = 12;                  //对应模块权限ID
                model.RBTableName       = "U_UserInfo";        //删除的表名
                model.RBFieldName       = "U_ID";              //删除相对应字段的id
                model.RBFieldValue      = U_ID.ToString();     //删除列名的id
                model.RBDeleteFieldName = "U_Mark_Delete";     //表的删除字段一般 某某某_Delete
                model.RBDeleteTime      = DateTime.Now;
                model.RBExcutePerson    = Common.GetSessionValue("loginName", context);
                model.EnterpriseCode    = enterpriseCode;
                if (model.RBExcutePerson == null)
                {
                    return(false);
                }
                bool result = MgrServices.RecycleBinService.PutDataInRecycleBin(model);
                return(result);
            }
            catch (Exception ex)
            {
                return(false);
            }
        }
コード例 #4
0
        /// <summary>
        /// 创建人:田闯
        /// 创建时间:2017/4/26
        /// 删除作答记录
        /// </summary>
        /// <param name="context"></param>
        private void DeleteAnwserRecord(HttpContext context)
        {
            int result = 0;

            try
            {
                string id     = string.Empty;
                string name   = string.Empty;
                string source = string.Empty;
                if (Common.GetRequest("id") != null)
                {
                    id = Common.GetRequest("id");
                }
                if (Common.GetRequest("name") != null)
                {
                    name = Common.GetRequest("name");
                }
                if (Common.GetRequest("source") != null)
                {
                    source = Common.GetRequest("source");
                }
                string enterpriseCode = Common.GetSessionValue("EnterpriseCode", context);
                int    modularId      = 25;//模块权限ID--调查结果
                if (source == "作答记录")
                {
                    modularId = 27;
                }
                //result = MgrServices.QuestionnaireService.DeleteAnwserRecord(id) == true ? 1 : 0;
                string[] quesIds = id.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries);
                string[] names   = name.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries);
                if (quesIds.Length > 0)
                {
                    for (int i = 0; i < quesIds.Length; i++)
                    {
                        CrisisInterfere.RecycleBinService.RecycleBinModel model = new RecycleBinService.RecycleBinModel();
                        model.RBTitle           = "删除" + source + "-" + names[i]; //标题
                        model.RBModularID       = modularId;                      //对应模块权限ID
                        model.RBTableName       = "Questionnaire_Respondence";    //删除的表名
                        model.RBFieldName       = "id";                           //删除相对应字段的id
                        model.RBFieldValue      = quesIds[i].ToString();          //删除列名的id
                        model.RBDeleteFieldName = "Is_Delete";                    //表的删除字段一般 某某某_Delete
                        model.RBDeleteTime      = DateTime.Now;
                        model.EnterpriseCode    = enterpriseCode;
                        model.RBExcutePerson    = Common.GetSessionValue("loginName", context);
                        if (model.RBExcutePerson == null)
                        {
                            context.Response.Write(result);
                            return;
                        }
                        result = MgrServices.RecycleBinService.PutDataInRecycleBin(model) == true ? 1 : 0;
                    }
                }
                context.Response.Write(result);
            }
            catch
            {
                context.Response.Write(result);
            }
        }
コード例 #5
0
        /// <summary> 删除 </summary>
        public void BatchDelete(HttpContext context)
        {
            try
            {
                int result = 0;
                // 获取请求Id
                string tempRequstQtid    = Common.GetRequest("ids");
                string tempRequestQtName = Common.GetRequest("names");
                string enterpriseCode    = Common.GetSessionValue("EnterpriseCode", context);

                string[] QT_Id   = tempRequstQtid.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries);
                string[] QT_Name = tempRequestQtName.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries);

                for (int i = 0; i < QT_Id.Length; i++)
                {
                    CrisisInterfere.RecycleBinService.RecycleBinModel model = new RecycleBinService.RecycleBinModel();
                    model.RBTitle           = "删除团体咨询档案-" + QT_Name[i]; //标题
                    model.RBModularID       = 33;                       //对应模块权限ID
                    model.RBTableName       = "GroupConsultationFile";  //删除的表名
                    model.RBFieldName       = "Id";                     //删除相对应字段的id
                    model.RBFieldValue      = QT_Id[i].ToString();      //删除列名的id
                    model.RBDeleteFieldName = "IsDelete";               //表的删除字段一般 某某某_Delete
                    model.RBDeleteTime      = DateTime.Now;
                    model.EnterpriseCode    = enterpriseCode;

                    model.RBExcutePerson = Common.GetSessionValue("loginName", Context);
                    if (model.RBExcutePerson == null)
                    {
                        Context.Response.Write(result);
                        return;
                    }
                    result = MgrServices.RecycleBinService.PutDataInRecycleBin(model) == true ? 1 : 0;
                }
                Context.Response.Write(result);

                //// 去除最后一个‘,’
                //if (tempRequstQtid != "")
                //    tempRequstQtid = tempRequstQtid.Substring(0, tempRequstQtid.Length - 1);
                //if (tempRequestQtName != "")
                //    tempRequestQtName = tempRequestQtName.Substring(0, tempRequestQtName.Length - 1);

                // 执行
                //  int tempCount = MgrServices.GroupConsultationService.BatchDeleteGroupConsultation(tempRequstQtid);

                // String json = Common.ObjectToJson(tempCount);
                // Context.Response.Write(json);
            }
            catch (Exception)
            {
                throw;
            }
        }
コード例 #6
0
        private void DeleteQuestionnaire(HttpContext context)
        {
            try
            {
                int    result = 0;
                string quesId = string.Empty;
                string name   = string.Empty;

                if (Common.GetRequest("id") != null)
                {
                    quesId = Common.GetRequest("id");
                }
                if (Common.GetRequest("names") != null)
                {
                    name = Common.GetRequest("names");
                }
                string enterpriseCode = Common.GetSessionValue("EnterpriseCode", context);

                string[] quesIds = quesId.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries);
                string[] names   = name.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries);
                if (quesIds.Length > 0)
                {
                    for (int i = 0; i < quesIds.Length; i++)
                    {
                        CrisisInterfere.RecycleBinService.RecycleBinModel model = new RecycleBinService.RecycleBinModel();
                        model.RBTitle           = "删除问卷管理-" + names[i];  //标题
                        model.RBModularID       = 23;                    //对应模块权限ID
                        model.RBTableName       = "Questionnaire_Info";  //删除的表名
                        model.RBFieldName       = "id";                  //删除相对应字段的id
                        model.RBFieldValue      = quesIds[i].ToString(); //删除列名的id
                        model.RBDeleteFieldName = "Is_Delete";           //表的删除字段一般 某某某_Delete
                        model.RBDeleteTime      = DateTime.Now;
                        model.EnterpriseCode    = enterpriseCode;
                        model.RBExcutePerson    = Common.GetSessionValue("loginName", context);
                        if (model.RBExcutePerson == null)
                        {
                            context.Response.Write(result);
                            return;
                        }
                        result = MgrServices.RecycleBinService.PutDataInRecycleBin(model) == true ? 1 : 0;
                    }
                }
                context.Response.Write(result);
            }
            catch
            {
            }
        }
コード例 #7
0
 /// <summary>
 /// 获取个体报告删除模块数据
 /// </summary>
 /// <param name="RBdeleteID"></param>
 /// <param name="context"></param>
 /// <returns></returns>
 public bool PersonalR(string RBdeleteID, HttpContext context)
 {
     try
     {
         long     result         = 0;
         string   names          = context.Request["name"];
         string   enterpriseCode = Common.GetSessionValue("EnterpriseCode", context);
         string[] name           = names.Split(',');
         string[] receiveID      = RBdeleteID.Split(',');
         if (receiveID.Length > 0)
         {
             for (int i = 0; i < receiveID.Length; i++)
             {
                 WebPages.RecycleBinService.RecycleBinModel model = new RecycleBinService.RecycleBinModel();
                 model.RBTitle           = "删除个体报告-" + name[i];     //标题
                 model.RBModularID       = 16;                      //对应模块权限ID
                 model.RBTableName       = "AnswerAdd";             //删除的表名
                 model.RBFieldName       = "AnswerAdd_ID";          //删除相对应字段的id
                 model.RBFieldValue      = receiveID[i].ToString(); //删除列名的id
                 model.RBDeleteFieldName = "AnswerIsDelete";        //表的删除字段一般 某某某_Delete
                 model.RBDeleteTime      = DateTime.Now;
                 model.EnterpriseCode    = enterpriseCode;
                 model.RBExcutePerson    = Common.GetSessionValue("loginName", context);
                 if (model.RBExcutePerson == null)
                 {
                     return(false);
                 }
                 result = Convert.ToInt32(MgrServices.RecycleBinService.PutDataInRecycleBin(model));
             }
         }
         if (result > 0)
         {
             return(true);
         }
         else
         {
             return(false);
         }
     }
     catch (Exception ex)
     {
         return(false);
     }
     //删除id的值,批量删除
 }
コード例 #8
0
        public void DeleteGroupReport(HttpContext context)
        {
            bool   isSuccess      = true;
            var    grid           = Common.GetRequest("grid");
            var    Report         = Common.GetRequest("ReportName");
            string enterpriseCode = Common.GetSessionValue("EnterpriseCode", context);
            var    ReportName     = Report.Split(',');
            var    gridArray      = grid.Split(',');

            for (int i = 0; i < gridArray.Length; i++)
            {
                if (!string.IsNullOrEmpty(gridArray[i]))
                {
                    CrisisInterfere.RecycleBinService.RecycleBinModel model = new RecycleBinService.RecycleBinModel();
                    model.RBTitle           = "删除团体报告-" + ReportName[i]; //标题
                    model.RBModularID       = 17;                        //对应模块权限ID
                    model.RBTableName       = "Group_Report";            //删除的表名
                    model.RBFieldName       = "GR_ID";                   //删除相对应字段的id
                    model.RBFieldValue      = gridArray[i];              //删除的具体id
                    model.RBDeleteFieldName = "GR_IsDelete";             //删除的字段
                    model.RBDeleteTime      = DateTime.Now;
                    model.EnterpriseCode    = enterpriseCode;
                    model.RBExcutePerson    = Common.GetSessionValue("loginName", context);
                    if (model.RBExcutePerson == null)
                    {
                        return;
                    }
                    isSuccess = MgrServices.RecycleBinService.PutDataInRecycleBin(model);
                    if (!isSuccess)
                    {
                        break;
                    }
                }
            }

            context.Response.Write(isSuccess);
            //if(MgrServices.GroupReportService.DeleteGroupReport(grid))
            //{
            //    context.Response.Write(true);
            //}
        }
コード例 #9
0
        public void deletes(HttpContext context)
        {
            bool result = false;

            try
            {
                string   data           = context.Request["chenum"];
                string   name           = context.Request["name"];
                string   EnterpriseCode = Common.GetSessionValue("EnterpriseCode", context);
                string[] d     = data.Split(','); //得到当前的数组集合
                string[] names = name.Split(','); //得到当前的数组集合
                if (d.Length > 0)
                {
                    for (int i = 0; i < d.Length; i++)
                    {
                        WebPages.RecycleBinService.RecycleBinModel model = new RecycleBinService.RecycleBinModel();
                        model.RBTitle           = "删除测评档案-" + names[i];  //标题
                        model.RBModularID       = 37;                    //对应模块权限ID
                        model.RBTableName       = "ArchivesMeasurement"; //删除的表名
                        model.RBFieldName       = "ArchivesID";          //删除相对应字段的id
                        model.RBFieldValue      = d[i].ToString();       //删除列名的id
                        model.RBDeleteFieldName = "is_Delete";           //表的删除字段一般 某某某_Delete
                        model.RBDeleteTime      = DateTime.Now;
                        model.RBExcutePerson    = Common.GetSessionValue("loginName", context);
                        model.EnterpriseCode    = EnterpriseCode;
                        if (model.RBExcutePerson == null)
                        {
                            return;
                        }
                        result = Convert.ToBoolean(MgrServices.RecycleBinService.InsertRecycleBin(model));
                    }
                }
                context.Response.Write(result);
            }
            catch (Exception ex)
            {
                context.Response.Write(result);
            }
        }
コード例 #10
0
        /// <summary> 删除 </summary>
        public void Delete(HttpContext context)
        {
            try
            {
                //问题类型Id
                string   tempQtIdList   = Common.GetRequest("id").Trim().TrimEnd(',');
                string[] tempQtId       = tempQtIdList.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
                string   tempQtNameList = Common.GetRequest("name").Trim().TrimEnd(',');
                string[] tempQtName     = tempQtNameList.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
                bool     result         = false;

                string enterpriseCode = Common.GetSessionValue("EnterpriseCode", context);

                for (int i = 0; i < tempQtId.Length; i++)
                {
                    CrisisInterfere.RecycleBinService.RecycleBinModel model = new RecycleBinService.RecycleBinModel();
                    model.RBTitle           = "删除个体咨询档案-" + tempQtName[i];  //标题
                    model.RBModularID       = 32;                           //对应模块权限ID
                    model.RBTableName       = "IndividualConsultationFile"; //删除的表名
                    model.RBFieldName       = "Id";                         //删除相对应字段的id
                    model.RBFieldValue      = tempQtId[i].ToString();       //删除列名的id
                    model.RBDeleteFieldName = "IsDelete";                   //表的删除字段一般 某某某_Delete
                    model.RBDeleteTime      = DateTime.Now;
                    model.RBExcutePerson    = Common.GetSessionValue("loginName", Context);
                    model.EnterpriseCode    = enterpriseCode;

                    if (model.RBExcutePerson == null)
                    {
                        return;
                    }
                    result = Convert.ToBoolean(MgrServices.RecycleBinService.PutDataInRecycleBin(model));
                }
                Context.Response.Write(result);
            }
            catch (Exception)
            {
                throw;
            }
        }
コード例 #11
0
        /// <summary>
        /// 创建时间:2016/11/4
        /// 方法阐述:创建删除查看结果的方法
        /// </summary>
        /// <param name="context"></param>
        public void DeleteViewResult(HttpContext context)
        {
            try
            {
                bool result = false;

                string[] str            = Common.GetRequest("answerAddID").Split(',');
                string[] name           = context.Request["name"].Split(',');
                string   enterpriseCode = Common.GetSessionValue("EnterpriseCode", context);
                for (int i = 0; i < str.Length; i++)
                {
                    if (!string.IsNullOrEmpty(str[i]))
                    {
                        WebPages.RecycleBinService.RecycleBinModel model = new RecycleBinService.RecycleBinModel();
                        model.RBTitle           = "删除查看结果-" + name[i] + ""; //标题
                        model.RBModularID       = 20;                       //对应模块权限ID
                        model.RBTableName       = "AnswerAdd";              //删除的表名
                        model.RBFieldName       = "AnswerAdd_ID";           //删除相对应字段的id
                        model.RBFieldValue      = str[i].ToString();        //删除列名的id
                        model.RBDeleteFieldName = "AnswerIsDelete";         //表的删除字段一般 某某某_Delete
                        model.RBDeleteTime      = DateTime.Now;
                        model.EnterpriseCode    = enterpriseCode;
                        model.RBExcutePerson    = Common.GetSessionValue("loginName", context);
                        if (model.RBExcutePerson == null)
                        {
                            return;
                        }
                        result = Convert.ToBoolean(MgrServices.RecycleBinService.PutDataInRecycleBin(model));
                    }
                }
                context.Response.Write(result);
            }
            catch (Exception ex)
            {
                context.Response.Write(false);
            }
        }
コード例 #12
0
        /// <summary>
        /// 创建时间:2017/5/9
        /// 删除报表
        /// </summary>
        /// <param name="context"></param>
        private void DeleteData(HttpContext context)
        {
            try
            {
                string id             = string.Empty;
                string name           = string.Empty;
                string userID         = Common.GetSessionValue("UserID", context);
                string enterpriseCode = Common.GetSessionValue("EnterpriseCode", context);
                long   userId         = 0;
                if (userID != "")
                {
                    userId = Convert.ToInt64(userID);
                }

                if (Common.GetRequest("id") != null)
                {
                    id = Common.GetRequest("id");
                }
                if (Common.GetRequest("name") != null)
                {
                    name = Common.GetRequest("name");
                }
                string[] idList   = id.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries);
                string[] nameList = name.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries);
                if (idList.Length == 0 || nameList.Length == 0)
                {
                    context.Response.Write(-1); return;
                }

                int result = 0;

                //判断当前用户的身份,往回收站中删除时填入不同的字段
                string roleName    = MgrServices.AdvisoryStatisticsService.GetRoleName(userId);
                string deleteField = "Is_Delete";
                if (roleName == "超级管理员")
                {
                    deleteField = "Super_Delete";
                }

                for (int i = 0; i < idList.Length; i++)
                {
                    WebPages.RecycleBinService.RecycleBinModel model = new RecycleBinService.RecycleBinModel();
                    model.RBTitle           = "删除咨询统计-" + nameList[i]; //标题
                    model.RBModularID       = 34;                      //对应模块权限ID
                    model.RBTableName       = "AdvisoryStatistics";    //删除的表名
                    model.RBFieldName       = "id";                    //删除相对应字段的id
                    model.RBFieldValue      = idList[i].ToString();    //删除列名的id
                    model.RBDeleteFieldName = deleteField;             //表的删除字段一般 某某某_Delete
                    model.RBDeleteTime      = DateTime.Now;
                    model.EnterpriseCode    = enterpriseCode;

                    model.RBExcutePerson = Common.GetSessionValue("loginName", context);
                    if (model.RBExcutePerson == null)
                    {
                        context.Response.Write(result);
                        return;
                    }
                    result = MgrServices.RecycleBinService.PutDataInRecycleBin(model) == true ? 1 : 0;
                }
                context.Response.Write(result);
            }
            catch
            {
            }
        }