Пример #1
0
 public object DeleteData(string caseId, string userid)
 {
     IDbTransaction tran = Utility.Database.BeginDbTransaction();
     try
     { //审核记录表
         if (!string.IsNullOrEmpty(caseId))
         {
             B_OA_Meeting data = new B_OA_Meeting();
             data.Condition.Add("CaseID=" + caseId);
             Utility.Database.Delete(data, tran);
             //删除相关业务,业务办结不可删除
             CommonFunctional.DeleteWorkFlowCase(caseId, userid, tran);
             Utility.Database.Commit(tran);
         }
         else
         {
             throw (new Exception("删除数据失败"));
         }
         bool b = true;
         return new
         {
         };
     }
     catch (Exception ex)
     {
         ComBase.Logger(ex);
         throw (new Exception("删除失败!", ex));
     }
 }
Пример #2
0
 public object GetCarByCaseId(string caseid)
 {
     var tran = Utility.Database.BeginDbTransaction();
     try
     {
         B_OA_Meeting baseInfor = new B_OA_Meeting();
         baseInfor.Condition.Add("CaseID = " + caseid);
         baseInfor = Utility.Database.QueryObject<B_OA_Meeting>(baseInfor,tran);
         Utility.Database.Commit(tran);
         return new
         {
             baseInfor = baseInfor
         };
     }
     catch (Exception ex)
     {
         Utility.Database.Rollback(tran);
         ComBase.Logger(ex);
         throw (new Exception("获取数据失败!", ex));
     }
 }
Пример #3
0
        public bool DeleteCase(string caseid, string userid, Object obj)
        {
            IDbTransaction tran = (IDbTransaction)obj;
            //加入针对不同的业务的删除前处理
            FX_WorkFlowCase workFlow = new FX_WorkFlowCase();
            workFlow.Condition.Add("ID =" + caseid);
            workFlow = Utility.Database.QueryObject<FX_WorkFlowCase>(workFlow, tran);
            if (workFlow != null)
            {
                string flowId = workFlow.FlowID;
                switch (flowId)
                {
                    case "W000098": //发文
                        B_OA_SendDoc_QuZhan sendDoc = new B_OA_SendDoc_QuZhan();
                        sendDoc.Condition.Add("caseid=" + caseid);
                        Utility.Database.Delete(sendDoc, tran);
                        break;
                    case "W000099": //收文
                        B_OA_ReceiveDoc_QuZhan receiveDoc = new B_OA_ReceiveDoc_QuZhan();
                        receiveDoc.Condition.Add("caseid=" + caseid);
                        Utility.Database.Delete(receiveDoc, tran);
                        break;
                    case "W000100": //内部事项
                        B_OA_SendDoc_Inner_QuZhan innderDoc = new B_OA_SendDoc_Inner_QuZhan();
                        innderDoc.Condition.Add("caseId=" + caseid);
                        Utility.Database.Delete(innderDoc, tran);
                        break;
                    case "W000070": //车辆申请
                        B_OA_Car car = new B_OA_Car();
                        car.Condition.Add("workflowcaseid=" + caseid);
                        Utility.Database.Delete(car, tran);
                        break;
                    case "W000071": //会议申请
                        B_OA_Meeting data = new B_OA_Meeting();
                        data.Condition.Add("CaseID=" + caseid);
                        Utility.Database.Delete(data, tran);
                        break;
                    case "W000079": //请假申请
                        B_OA_LeaveList leave = new B_OA_LeaveList();
                        leave.Condition.Add("caseId=" + caseid);
                        Utility.Database.Delete(leave, tran);
                        break;
                    case "W000080": //出差申请
                        B_OA_TravelList travel = new B_OA_TravelList();
                        travel.Condition.Add("caseId=" + caseid);
                        Utility.Database.Delete(travel, tran);
                        break;
                    case "W000089": //通知公告
                        B_OA_Notice notice = new B_OA_Notice();
                        notice.Condition.Add("caseid=" + caseid);
                        Utility.Database.Delete(notice, tran);
                        break;
                }
                if (!string.IsNullOrEmpty(caseid))
                {
                    //删除正文路径
                    B_Common_CreateDoc createDoc = new B_Common_CreateDoc();
                    createDoc.Condition.Add("caseid=" + caseid);
                    Utility.Database.Delete(createDoc, tran);
                    //删除附件
                    FX_AttachMent attach  = new FX_AttachMent();
                    attach.Condition.Add("CaseID="+caseid);
                    Utility.Database.Delete(attach, tran);

                }
            }
            return true;
        }
Пример #4
0
 public string LoadData(string cph, string sfky, string userid)
 {
     GetDataModel data = new GetDataModel();
     B_OA_Meeting list = new B_OA_Meeting();
     data.dataList = Utility.Database.QueryList(list);
     data.baseInfo = new B_OA_Meeting();
     return JsonConvert.SerializeObject(data);
 }