• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# GetDataModel类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中GetDataModel的典型用法代码示例。如果您正苦于以下问题:C# GetDataModel类的具体用法?C# GetDataModel怎么用?C# GetDataModel使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



GetDataModel类属于命名空间,在下文中一共展示了GetDataModel类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: GetData

        public object GetData(string userid, string caseId)
        {
            try
            {
                GetDataModel dataModel = new GetDataModel();
                B_OA_Notice en = new B_OA_Notice();
                en.Condition.Add("caseid=" + caseId);
                dataModel.baseInfor_Notice = Utility.Database.QueryObject<B_OA_Notice>(en);
                if (dataModel.baseInfor_Notice == null)
                {
                    //初始化数据
                    IDbTransaction tran = Utility.Database.BeginDbTransaction();
                    var baseInfor_Notice = new B_OA_Notice();
                    baseInfor_Notice.status = "0";
                    baseInfor_Notice.CreaterId = userid;
                    var userInfor = ComClass.GetUserInfo(userid);
                    baseInfor_Notice.CreateMan = userInfor.CnName;
                    baseInfor_Notice.CreateTime = DateTime.Now.ToString();
                    baseInfor_Notice.NewsId = ComClass.GetGuid();
                    baseInfor_Notice.Chk = "0";
                    B_OA_FileType fileType = ComDocumentCenterOperate.GetFileTypeByFlayType("4", tran);
                    baseInfor_Notice.documentTypeId = fileType.FileTypeId;
                    baseInfor_Notice.documentTypeName = ComDocumentCenterOperate.getFileTypeNameByFileTypeId(fileType.FileTypeId, tran);
                    dataModel.baseInfor_Notice = baseInfor_Notice;

                    Utility.Database.Commit(tran);
                }
                return  dataModel;
            }
            catch (Exception ex)
            {
                ComBase.Logger(ex);
                throw (new Exception("获取数据失败!", ex));
            }
        }
开发者ID:leo481,项目名称:OA,代码行数:35,代码来源:B_OA_TrafficFlow_NoticeVerifySvc.cs


示例2: GetData

        public object GetData(string userid, string caseId, string baid, string actid)
        {
            try
            {
                //只有待办箱才有设置为已读
                if (!String.IsNullOrEmpty(baid)) engineAPI.SetIsReaded(caseId, baid, userid);

                var data = new GetDataModel();
                B_OA_LeaveList en = new B_OA_LeaveList();
                en.Condition.Add("caseId=" + caseId);
                data.baseInfo = Utility.Database.QueryObject<B_OA_LeaveList>(en);
                if (data.baseInfo == null)
                {
                    data.baseInfo = new B_OA_LeaveList();
                    DeptInfoAndUserInfo d_u_Infor = ComClass.GetDeptAndUserByUserId(userid);
                    data.baseInfo.leaveer = userid;
                    data.baseInfo.leaveName = d_u_Infor.userinfo.CnName;
                    data.baseInfo.dpname = d_u_Infor.deptinfo.DPName;
                }
                else
                {
                    data.baseInfo.leaveName = ComClass.GetUserInfo(data.baseInfo.leaveer).CnName;
                    data.baseInfo.dpname = ComClass.GetDeptByUserId(data.baseInfo.leaveer).FullName;
                }

                return data;
            }
            catch (Exception ex)
            {
                ComBase.Logger(ex);
                throw (new Exception("获取数据失败!", ex));
            }
        }
开发者ID:hehaiquan,项目名称:OA,代码行数:33,代码来源:B_OA_LeaveSvc.cs


示例3: GetData

 public object GetData(string userid, string caseId, string baid, string actid)
 {
     try
     {
         if (!String.IsNullOrEmpty(baid)) engineAPI.SetIsReaded(caseId, baid, userid);
         var data = new GetDataModel();
         if (caseId == "")
         {
             DeptInfoAndUserInfo userData = ComClass.GetDeptAndUserByUserId(userid);
             data.sendDocBaseInfo = new B_OA_SendDoc_Inner_QuZhan();
             data.sendDocBaseInfo.underTakeManId = userData.userinfo.UserID;
             data.sendDocBaseInfo.undertakeMan = userData.userinfo.CnName;
             data.sendDocBaseInfo.underTakeDep = userData.deptinfo.DPName;
             data.sendDocBaseInfo.underTakeDepId = userData.deptinfo.DPID;
             B_OA_FileType fileType = new B_OA_FileType();
             fileType.Condition.Add("flagType = " + "3");
             fileType = Utility.Database.QueryObject<B_OA_FileType>(fileType);
             data.sendDocBaseInfo.fileTypeId = fileType.FileTypeId;
         }
         else
         {
             B_OA_SendDoc_Inner_QuZhan userData = new B_OA_SendDoc_Inner_QuZhan();
             userData.Condition.Add("caseId=" + caseId);
             userData = Utility.Database.QueryObject<B_OA_SendDoc_Inner_QuZhan>(userData);
             data.sendDocBaseInfo = userData;
         }
         return data;
     }
     catch (Exception ex)
     {
         ComBase.Logger(ex);
         throw (new Exception("获取数据失败!", ex));
     }
 }
开发者ID:hehaiquan,项目名称:OA,代码行数:34,代码来源:B_OA_SendDoc_Inner_QuZhanSvc.cs


示例4: GetData

        public object GetData(string userid, string caseId)
        {
            try
            {
                GetDataModel dataModel = new GetDataModel();
                B_OA_Notice en = new B_OA_Notice();
                en.Condition.Add("caseid=" + caseId);
                dataModel.baseInfor_Notice = Utility.Database.QueryObject<B_OA_Notice>(en);
                if (dataModel.baseInfor_Notice == null)
                {
                    //初始化数据
                    IDbTransaction tran = Utility.Database.BeginDbTransaction();
                    var baseInfor_Notice = new B_OA_Notice();
                    baseInfor_Notice.status = "checkUnthrough";
                    baseInfor_Notice.CreaterId = userid;
                    var userInfor = ComClass.GetUserInfo(userid);
                    baseInfor_Notice.CreateMan = userInfor.CnName;
                    baseInfor_Notice.CreateTime = DateTime.Now.ToString();
                    baseInfor_Notice.NewsId = ComClass.GetGuid();
                    baseInfor_Notice.Chk = "0";
                    dataModel.baseInfor_Notice = baseInfor_Notice;

                    Utility.Database.Commit(tran);
                }
                return Utility.JsonResult(true, null, dataModel);
            }
            catch (Exception ex)
            {
                ComBase.Logger(ex);
                throw (new Exception("获取数据失败!", ex));
            }
        }
开发者ID:hehaiquan,项目名称:OA,代码行数:32,代码来源:B_OA_TrafficFlow_PublicNoticeSvc.cs


示例5: GetData

        public object GetData(string userid, string caseId, string baid)
        {
            try
            {
                //只有待办箱才有设置为已读
                if (!String.IsNullOrEmpty(baid)) engineAPI.SetIsReaded(caseId, baid, userid);

                GetDataModel data = new GetDataModel();
                B_OA_SendDoc_Science en = new B_OA_SendDoc_Science();
                en.Condition.Add("caseid=" + caseId);
                data.sendDocBaseInfo = Utility.Database.QueryObject<B_OA_SendDoc_Science>(en);
                if (data.sendDocBaseInfo == null)
                {
                    var baseInfo = new B_OA_SendDoc_Science();
                    baseInfo.sendDate = DateTime.Now;
                    baseInfo.createManId = userid;
                    //baseInfo.gklx = "1";//公开类型默认为主动公开
                    data.sendDocBaseInfo = baseInfo;
                }
                return data;
            }
            catch (Exception ex)
            {
                ComBase.Logger(ex);
                throw (new Exception("获取数据失败!", ex));
            }
        }
开发者ID:leo481,项目名称:OA,代码行数:27,代码来源:B_OA_SendDoc_ScienceSvc.cs


示例6: CreateMainBody

 public string CreateMainBody(string content, string guid, string caseid, string userid, string type,string actId)
 {
     IDbTransaction tran = Utility.Database.BeginDbTransaction();
     GetDataModel dataModel = new GetDataModel();
     try
     {
         string id = "";
         if (String.IsNullOrEmpty(caseid))
         {
             id = guid;
         }
         else
         {
             id = caseid;
         }
         //正文路径
         string path = GetFilePath("mainbody", id, userid, tran, type, actId);
         dataModel.mainBodyPath = path;
         Utility.Database.Commit(tran);
         return Utility.JsonResult(true, "发送成功!", dataModel);
     }
     catch (Exception ex)
     {
         ComBase.Logger(ex);
         throw (new Exception("读取正文模版失败!", ex));
     }
 }
开发者ID:hehaiquan,项目名称:OA,代码行数:27,代码来源:B_OA_SendDocSvc.cs


示例7: GetUserInforList

        public string GetUserInforList(string userid)
        {
            var tran = Utility.Database.BeginDbTransaction();
              GetDataModel dataModel = new GetDataModel();
              try
              {
                  StringBuilder strSql = new StringBuilder();
                  strSql.Append(@"
            SELECT
            a.UserID,
            a.CnName,
            a.SEX,
            a.DPID,
            a.JobPosition,
            a.EntryTime,
            b.DPName
            FROM
            FX_UserInfo AS a
            LEFT JOIN FX_Department AS b ON a.DPID = b.DPID
            ORDER BY
            UserID DESC
            ");
                  DataSet ds = Utility.Database.ExcuteDataSet(strSql.ToString(),tran);
                  dataModel.dt = ds.Tables[0];
                  Utility.Database.Commit(tran);
                  return JsonConvert.SerializeObject(dataModel);//将对象转为json字符串并返回到客户端

              }
              catch (Exception ex)
              {
                  ComBase.Logger(ex);//写异常日志到本地文件夹
                  return Utility.JsonMsg(false, ex.Message);//将对象转为json字符串并返回到客户端
              }
            return "";
        }
开发者ID:y0y0alice,项目名称:OA,代码行数:35,代码来源:FX_UserInfoSvc.cs


示例8: GetData

        public string GetData(string userid)
        {
            GetDataModel dataModel = new GetDataModel();
            try
            {
                StringBuilder strSql = new StringBuilder();
                strSql.Append(string.Format(@"SELECT TOP 1
            ISNULL(PunchID,0) AS PunchID , UserID, PunchDate, CONVERT(VARCHAR(20),ToWorkTime,120) AS ToWorkTime,
             CONVERT(VARCHAR(20),DownWorkTime,120) AS DownWorkTime, Remark,SUBSTRING(CONVERT(VARCHAR(20),B.StartTime,120),11,6) AS StartTime,SUBSTRING(CONVERT(VARCHAR(20),B.EndTime,120),11,6) AS EndTime,
            A.WorkingDayID, WorkingDayName, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday, BeginExecuteDay
             FROM B_OA_WorkingDay A
            LEFT JOIN B_OA_WorkingTimes B ON A.WorkingDayID = B.WorkingDayID
            LEFT JOIN B_OA_Punch C ON C.UserID = '{0}' AND (ToWorkTime > CONVERT(VARCHAR(10),GETDATE(),120)OR DownWorkTime > CONVERT(VARCHAR(10),GETDATE(),120)) AND A.WorkingDayID = C.WorkingDayID
            ORDER BY A.WorkingDayID DESC
            ", userid));
                DataSet dataSet = Utility.Database.ExcuteDataSet(strSql.ToString());
                string jsonData = JsonConvert.SerializeObject(dataSet.Tables[0]);
                dataModel.baseInfo = ((List<B_OA_Punch>)JsonConvert.DeserializeObject(jsonData, typeof(List<B_OA_Punch>)))[0];

                return JsonConvert.SerializeObject( dataModel);
            }
            catch (Exception ex)
            {
                return Utility.JsonMsg(false, ex.Message);
            }
        }
开发者ID:y0y0alice,项目名称:OA,代码行数:26,代码来源:B_OA_PunchSvc.cs


示例9: GetData

        public string GetData(string beginTime, string endTime, string name, string userid)
        {
            IDbTransaction tran = null;
            DataSet dataSet = null;
            GetDataModel dataModel = new GetDataModel();
            try
            {
                tran = Utility.Database.BeginDbTransaction();
                string sql = "select * from B_OA_Attendance where 1=1 ";
                if (name != null & name != "") { sql += " and name='{0}' "; sql = string.Format(sql, name); }
                if (beginTime != null & beginTime != "") { sql += " and WorkDate>='{0}'"; sql = string.Format(sql, beginTime); }
                if (endTime != null & endTime != "") { sql += " and WorkDate<='{0}'"; sql = string.Format(sql, endTime); }
                sql += " order by WorkDate desc ";
                dataSet = Utility.Database.ExcuteDataSet(sql, tran);
                string jsonData = JsonConvert.SerializeObject(dataSet.Tables[0]);
                List<B_OA_Attendance> listAttentdance = (List<B_OA_Attendance>)JsonConvert.DeserializeObject(jsonData, typeof(List<B_OA_Attendance>));
                dataModel.listAttendance = new List<B_OA_Attendance>();
                dataModel.listAttendance = listAttentdance;

                Utility.Database.Commit(tran);//提交事务
                return JsonConvert.SerializeObject( dataModel);//将对象转为json字符串并返回到客户端
            }
            catch (Exception ex)
            {
                Utility.Database.Rollback(tran);
                ComBase.Logger(ex);//写异常日志到本地文件夹
                return Utility.JsonMsg(false, ex.Message);//将对象转为json字符串并返回到客户端
            }
            finally {
                dataSet.Dispose();
            }
        }
开发者ID:y0y0alice,项目名称:OA,代码行数:32,代码来源:B_OA_AttendanceSvc.cs


示例10: GetData

 public string GetData(string userid)
 {
     StringBuilder strSql = new StringBuilder();
     GetDataModel dataModel = new GetDataModel();
     strSql.Append(@"SELECT TOP 1
      A.WorkingDayID, WorkingDayName, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday, CONVERT(VARCHAR(10),BeginExecuteDay,120) AS BeginExecuteDay,
      (CASE Monday WHEN 1 THEN '周一' ELSE '' END) +
      (CASE  WHEN (Tuesday = 1 AND Monday = 0) THEN '周二' WHEN Tuesday = 1 THEN ',周二' ELSE '' END)+
      (CASE WHEN (Wednesday = 1 AND Tuesday = 0 AND Monday = 0) THEN '周三'  WHEN Wednesday = 1 THEN ',周三' ELSE '' END)+
      (CASE WHEN (Thursday = 1 AND Wednesday = 0 AND Tuesday = 0 AND Monday = 0) THEN '周四' WHEN Thursday = 1 THEN ',周四' ELSE '' END)+
      (CASE WHEN (Friday = 1 AND Thursday = 0 AND Wednesday = 0 AND Tuesday = 0 AND Monday = 0) THEN '周五' WHEN Friday = 1 THEN ',周五' ELSE '' END)+
      (CASE WHEN (Saturday = 1 AND Friday = 0 AND Thursday = 0 AND Wednesday = 0 AND Tuesday = 0 AND Monday = 0) THEN '周六' WHEN Saturday = 1 THEN ',周六' ELSE '' END)+
      (CASE Sunday WHEN 1 THEN ',周日' ELSE '' END) AS WorkingDay,
      ISNULL(STUFF((SELECT '' + B.WorkingTime FROM
      (SELECT WorkingDayID, (SUBSTRING(CONVERT(VARCHAR(20),StartTime,120),11,6) + '~' + SUBSTRING(CONVERT(VARCHAR(20),EndTime,120),11,6)) AS WorkingTime
      FROM B_OA_WorkingTimes WHERE WorkingDayID = A.WorkingDayID)B
      FOR XML PATH ('')),1,1,''),'') AS WorkingTime,SUBSTRING(CONVERT(VARCHAR(20),B.StartTime,120),11,6) AS StartTime,
      SUBSTRING(CONVERT(VARCHAR(20),B.EndTime,120),11,6) AS EndTime
     FROM B_OA_WorkingDay A
     LEFT JOIN B_OA_WorkingTimes B ON B.WorkingDayID = A.WorkingDayID
     ORDER BY A.WorkingDayID DESC");
     DataSet dataSet = Utility.Database.ExcuteDataSet(strSql.ToString());
     string jsonData = JsonConvert.SerializeObject(dataSet.Tables[0]);
     dataModel.dataList = (List<B_OA_WorkingDay>)JsonConvert.DeserializeObject(jsonData, typeof(List<B_OA_WorkingDay>));
     return Utility.JsonResult(true, null, dataModel);
 }
开发者ID:hehaiquan,项目名称:OA,代码行数:26,代码来源:B_OA_WorkingDaySvc.cs


示例11: GetData

        public string GetData(string beginTime, string endTime,string ScheduleType, string userid)
        {
            //只有待办箱才有设置为已读
            //if (!String.IsNullOrEmpty(baid)) engineAPI.SetIsReaded(caseId, baid, userid);

            IDbTransaction tran = null;
            DataSet dataSet = null;
            try
            {
                tran = Utility.Database.BeginDbTransaction();
                GetDataModel data = new GetDataModel();//获取数据模型
                data.baseInfo = new B_OA_Schedule();

                string sql = "select CONVERT(varchar(20),ScheduleTime,23) as ScheduleTime,* from B_OA_Schedule where 1=1 ";
                if (ScheduleType != null & ScheduleType != "") { sql += " and ScheduleType='{0}' "; sql = string.Format(sql, ScheduleType); }

                if (beginTime != null & beginTime != "") { sql += " and ScheduleTime>='{0}'"; sql = string.Format(sql, beginTime); }
                if (endTime != null & endTime != "") { sql += " and ScheduleTime<='{0}'"; sql = string.Format(sql, endTime); }
                sql += " order by B_OA_Schedule.ScheduleTime ";
                dataSet = Utility.Database.ExcuteDataSet(sql, tran);
                data.List = dataSet.Tables[0];
                Utility.Database.Commit(tran);//提交事务
                return Utility.JsonResult(true, null, data);//将对象转为json字符串并返回到客户端
            }
            catch (Exception ex)
            {
                Utility.Database.Rollback(tran);
                ComBase.Logger(ex);//写异常日志到本地文件夹
                return Utility.JsonResult(false, ex.Message);//将对象转为json字符串并返回到客户端
            }
            finally {
                dataSet.Dispose();
            }
        }
开发者ID:hehaiquan,项目名称:OA,代码行数:34,代码来源:B_OA_ScheduleSvc.cs


示例12: GetData

        public object GetData(string userid, string caseId, string baid)
        {
            //只有待办箱才有设置为已读
            if (!String.IsNullOrEmpty(baid)) engineAPI.SetIsReaded(caseId, baid, userid);

            GetDataModel data = new GetDataModel();
            B_OA_SupervisionReminder en = new B_OA_SupervisionReminder();
            en.Condition.Add("caseId=" + caseId);
            data.reminderBaseInfor = Utility.Database.QueryObject<B_OA_SupervisionReminder>(en);

            B_OA_Supervision_Bill supervisionBill = new B_OA_Supervision_Bill();
            supervisionBill.Condition.Add("caseid =" + caseId);
            data.supervisionBill = Utility.Database.QueryObject<B_OA_Supervision_Bill>(supervisionBill);

            if (data.reminderBaseInfor == null)
            {
                var baseInfo = new B_OA_SupervisionReminder();
                baseInfo.createDate = DateTime.Now.ToString();
                baseInfo.reminderManId = userid;
                baseInfo.reminderManName = ComClass.GetUserInfo(userid).CnName;
                data.reminderBaseInfor = baseInfo;

                //督办通知单据
                B_OA_Supervision_Bill supervisionBill_ad = new B_OA_Supervision_Bill();
                supervisionBill_ad.content = GetSupervisionBill();
                supervisionBill_ad.year = DateTime.Now.Year.ToString();
                supervisionBill_ad.createDate = DateTime.Now.ToString("yyyy年MM月dd日");
                data.supervisionBill = supervisionBill_ad;
            }
            return data;
        }
开发者ID:hehaiquan,项目名称:OA,代码行数:31,代码来源:B_OA_Supervision_ReminderSvc.cs


示例13: GetData

        public object GetData(string userid, string caseId, string baid, string actid)
        {
            try
            {
                if (!String.IsNullOrEmpty(actid))
                {
                    //只有待办箱才有设置为已读
                    if (!String.IsNullOrEmpty(baid)) engineAPI.SetIsReaded(caseId, baid, userid);
                }

                var data = new GetDataModel();
                // 一个会议有多个议程
                #region 会议信息
                B_OA_ConferenceMain en = new B_OA_ConferenceMain();
                en.Condition.Add("workflowcaseid = " + caseId);
                data.baseInfo = Utility.Database.QueryObject<B_OA_ConferenceMain>(en);

                //新建
                if (data.baseInfo == null)
                {
                    var baseInfo = new B_OA_ConferenceMain();
                    //var userInfo = ComClass.GetUserInfo(userid);
                    data.baseInfo = baseInfo;
                }
                #endregion

                #region 议程信息列表
                if (data.baseInfo != null)
                {
                    B_OA_Conf_Agenda agendaEnt = new B_OA_Conf_Agenda();
                    agendaEnt.Condition.Add("workflowcaseid=" + data.baseInfo.workflowcaseid);
                    data.agendaList = Utility.Database.QueryList<B_OA_Conf_Agenda>(agendaEnt);
                }
                #endregion

                #region 编辑行议程信息
                if (data.baseInfo != null)
                {
                    data.agendaListDetail = new B_OA_Conf_Agenda();
                    data.agendaListDetail.workflowcaseid = data.baseInfo.workflowcaseid;
                }
                #endregion

               return data;
            }
            catch (Exception ex)
            {
                ComBase.Logger(ex);
                throw (new Exception("获取数据失败!", ex));
            }
        }
开发者ID:y0y0alice,项目名称:OA,代码行数:51,代码来源:B_OA_ConferenceMainSvc.cs


示例14: GetData

        public object GetData(string userid, string caseId, string baid, string actid)
        {
            try
            {
                if (!String.IsNullOrEmpty(actid))
                {
                    //只有待办箱才有设置为已读
                    if (!String.IsNullOrEmpty(baid)) engineAPI.SetIsReaded(caseId, baid, userid);
                }

                var data = new GetDataModel();
                IDbTransaction tran = Utility.Database.BeginDbTransaction();
                #region 基础信息
                B_OA_ReceiveDoc_QuZhan en = new B_OA_ReceiveDoc_QuZhan();
                en.Condition.Add("caseID = " + caseId);
                data.baseInfo = Utility.Database.QueryObject<B_OA_ReceiveDoc_QuZhan>(en);
                //新建
                if (data.baseInfo == null)
                {

                    var baseInfo = new B_OA_ReceiveDoc_QuZhan();
                    StringBuilder strSql = new StringBuilder();

                    baseInfo.recordManId = userid;
                    baseInfo.recordManName = ComClass.GetUserInfo(userid).CnName;
                    //var userInfo = ComClass.GetUserInfo(userid);
                    data.baseInfo = baseInfo;
                    //此设置用于绑定来文编号
                    strSql.Clear();
                    strSql.AppendFormat(@"select FileTypeId as id ,remark  ,FileTypeName as mc from B_OA_FileType
             WHERE ParentId =(select FileTypeId from B_OA_FileType WHERE flagType ='2') order by RankID asc;");
                    data.receiveDic = Utility.Database.ExcuteDataSet(strSql.ToString()).Tables[0];

                    strSql.Clear();
                    strSql.AppendFormat(@"select Max(substring(code,9,5)) from B_OA_ReceiveDoc_QuZhan");
                    DataSet ds = Utility.Database.ExcuteDataSet(strSql.ToString(), tran);
                    string code = ds.Tables[0].Rows[0][0].ToString();
                    data.code = code;
                }
                #endregion

                return data;
            }
            catch (Exception ex)
            {
                ComBase.Logger(ex);
                throw (new Exception("获取数据失败!", ex));
            }
        }
开发者ID:y0y0alice,项目名称:OA,代码行数:49,代码来源:B_OA_ReceiveDoc_QuZhanSvc.cs


示例15: GetData

 public object GetData(string userid, string caseId, string baid)
 {
     try
     {
         //只有待办箱才有设置为已读
         if (!String.IsNullOrEmpty(baid)) engineAPI.SetIsReaded(caseId, baid, userid);
         GetDataModel data = new GetDataModel();
         return null;
     }
     catch (Exception ex)
     {
         ComBase.Logger(ex);
         throw (new Exception("获取数据失败!", ex));
     }
 }
开发者ID:y0y0alice,项目名称:OA,代码行数:15,代码来源:B_OA_FixedApplySvc.cs


示例16: GetData

        public object GetData(string userid, string caseId, string baid, string actid)
        {
            try
            {
                //只有待办箱才有设置为已读
                if (!String.IsNullOrEmpty(baid)) engineAPI.SetIsReaded(caseId, baid, userid);

                var data = new GetDataModel();
                IDbTransaction tran = Utility.Database.BeginDbTransaction();
                #region 基础信息
                B_OA_ReceiveDoc_QuZhan en = new B_OA_ReceiveDoc_QuZhan();
                en.Condition.Add("caseID = " + caseId);
                data.baseInfo = Utility.Database.QueryObject<B_OA_ReceiveDoc_QuZhan>(en);
                //新建
                if (data.baseInfo == null)
                {

                    var baseInfo = new B_OA_ReceiveDoc_QuZhan();
                    string strSql = "select Max(substring(code,9,5)) from B_OA_ReceiveDoc_QuZhan";
                    DataSet ds = Utility.Database.ExcuteDataSet(strSql, tran);
                    string code = ds.Tables[0].Rows[0][0].ToString();
                    if (code == "")
                    {
                        baseInfo.code = "LW[" + DateTime.Now.Year.ToString() + "]00001";
                    }
                    else
                    {
                        baseInfo.code = "LW[" + DateTime.Now.Year + "]" + (int.Parse(code) + 1).ToString();
                    }
                    baseInfo.recordManId = userid;
                    baseInfo.recordManName = ComClass.GetUserInfo(userid).CnName;
                    //var userInfo = ComClass.GetUserInfo(userid);
                    data.baseInfo = baseInfo;
                }
                #endregion

                return data;
            }
            catch (Exception ex)
            {
                ComBase.Logger(ex);
                throw (new Exception("获取数据失败!", ex));
            }
        }
开发者ID:hehaiquan,项目名称:OA,代码行数:44,代码来源:B_OA_ReceiveDoc_QuZhanSvc.cs


示例17: GetData

        public string GetData(string beginTime,string endTime,string workLogType,string userid)
        {
            var tran = Utility.Database.BeginDbTransaction();
            //定义原始模板,传入前台
            GetDataModel data = new GetDataModel();
            data.baseInfo = new B_WorkLog();
            //data.baseInfo.createDate =  DateTime.Now.ToString('yyyy-MM-dd');
            data.baseInfo.workOvertime = "0";
            try
            {
                //定义查找条件
                StringBuilder strWhereSql = new StringBuilder();
                if (beginTime!="") {
                    strWhereSql.AppendFormat(@" and newTb.createDate>='{0}'", beginTime);
                }
                if (endTime!="")
                {
                    strWhereSql.AppendFormat(@" and newTb.createDate<='{0}'",endTime);
                }

                StringBuilder strSql = new StringBuilder();
                strSql.AppendFormat(@"select CONVERT(varchar(20),newTb.createDate,23) as createDate,newTb.*,a.mc as logTypeName from B_WorkLog as newTb
                left join (select * from Para_BizTypeItem where flid = (select id from Para_BizTypeDictionary where lx='logTypeDic')) as a on newTb.logType=a.csz
                where newTb.createManId='{0}' and newTb.workLogType={1}
                ", userid, workLogType);

                if(strWhereSql.ToString()!=""){
                    strSql.Append(strWhereSql);
                }

                DataSet goodsDataSet = Utility.Database.ExcuteDataSet(strSql.ToString(), tran);
                data.List = goodsDataSet.Tables[0];
                Utility.Database.Commit(tran);//提交事务
                return Utility.JsonResult(true, "数据加载成功", data);//将对象转为json字符串并返回到客户端

            }
            catch (Exception e)
            {
                Utility.Database.Rollback(tran);
                return Utility.JsonResult(false, "数据加载失败!异常信息: " + e.Message);
            }
        }
开发者ID:hehaiquan,项目名称:OA,代码行数:42,代码来源:B_WorkLogSvc.cs


示例18: GetData

        public object GetData(string userid, string caseId, string baid)
        {
            //只有待办箱才有设置为已读
            if (!String.IsNullOrEmpty(baid)) engineAPI.SetIsReaded(caseId, baid, userid);

            GetDataModel data = new GetDataModel();
            B_OA_Supervision_Delay_Apply en = new B_OA_Supervision_Delay_Apply();
            en.Condition.Add("caseId=" + caseId);
            data.delayApplyBaseInfor = Utility.Database.QueryObject<B_OA_Supervision_Delay_Apply>(en);
            if (data.delayApplyBaseInfor == null)
            {
                var baseInfo = new B_OA_Supervision_Delay_Apply();
                baseInfo.createDate = DateTime.Now.ToString();
                baseInfo.applyManId = userid;
                baseInfo.applyManName = ComClass.GetUserInfo(userid).CnName;
                data.delayApplyBaseInfor = baseInfo;
            }
            data.userid = userid;
            return data;
        }
开发者ID:leo481,项目名称:OA,代码行数:20,代码来源:B_OA_Supervision_Delay_ApplySvc.cs


示例19: GetDataById

        public string GetDataById(string userid, string id)
        {
            GetDataModel dataModel = new GetDataModel();
            try
            {
                dataModel.supervision = new B_OA_Supervision();
                if (String.IsNullOrEmpty(id))
                {

                    dataModel.supervision.createDate = DateTime.Now.ToString();
                    dataModel.supervision.supervisionManId = userid;
                    dataModel.supervision.status = "1";//未读取的督办
                    dataModel.supervision.supervisionManName = ComClass.GetUserInfo(userid).CnName;

                }
                return JsonConvert.SerializeObject( dataModel);
            }
            catch (Exception ex)
            {
                ComBase.Logger(ex);
                return Utility.JsonMsg(false, ex.Message);
            }
        }
开发者ID:y0y0alice,项目名称:OA,代码行数:23,代码来源:SupervisionOfInspectorSvc.cs


示例20: GetData

        public string GetData(string userid)
        {
            var tran = Utility.Database.BeginDbTransaction();
            GetDataModel data = new GetDataModel();
            data.databaseInform = new B_EmailDocument();

            try
            {
                StringBuilder sqlStr = new StringBuilder();
                sqlStr.AppendFormat("select {0} from B_EmailDocument where createManId='{1}' order by id desc", FieldList, userid);

                DataSet dataSet = Utility.Database.ExcuteDataSet(sqlStr.ToString(), tran);
                data.dataList = dataSet.Tables[0];

                Utility.Database.Commit(tran);//提交事务
                return JsonConvert.SerializeObject(data);//将对象转为json字符串并返回到客户端
            }
            catch (Exception e)
            {
                Utility.Database.Rollback(tran);
                return Utility.JsonMsg(false, "数据加载失败!异常信息: " + e.Message);
            }
        }
开发者ID:y0y0alice,项目名称:OA,代码行数:23,代码来源:B_EmailDocumentSvc.cs



注:本文中的GetDataModel类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# GetMemberOptions类代码示例发布时间:2022-05-24
下一篇:
C# Get类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap