Exemple #1
0
        public List<T_OA_ORGANIZATION> GetOrganList(int pageIndex, int pageSize, string sort, string filterString, object[] paras, ref int pageCount, string checkState, LoginUserInfo loginUserInfo)
        {
            // 在此处添加操作实现
            IQueryable<T_OA_ORGANIZATION> organList = null;
            using (OrganManagementBll organBll = new OrganManagementBll())
            {
                if (checkState != ((int)CheckStates.WaittingApproval).ToString())
                {
                    if (checkState != ((int)CheckStates.ALL).ToString())
                    {
                        organList = organBll.GetOrganQueryWithPaging(pageIndex, pageSize, sort, filterString, paras, ref  pageCount, null, checkState, loginUserInfo.userID);
                    }
                    else
                    {
                        organList = organBll.GetOrganQueryWithPaging(pageIndex, pageSize, sort, filterString, paras, ref  pageCount, null, "", loginUserInfo.userID);
                    }

                }
                else   //获取审批列表
                {
                    FLOW_FLOWRECORDDETAIL_T[] flowList = workFlowWS.GetFlowInfo("", "", "", "0", "Organization", loginUserInfo.companyID, loginUserInfo.userID);
                    if (flowList == null)
                    {
                        return null;
                    }
                    List<V_FlowAPP> flowAppList = new List<V_FlowAPP>();
                    for (int i = 0; i < flowList.Length; i++)
                    {

                        V_FlowAPP App = new V_FlowAPP();
                        App.Guid = flowList[i].FLOWRECORDDETAILID;
                        App.FormID = flowList[i].FLOW_FLOWRECORDMASTER_T.FORMID;
                        App.EditUserID = flowList[i].EDITUSERID;
                        App.EditUserName = flowList[i].EDITUSERNAME;
                        flowAppList.Add(App);
                    }
                    checkState = ((int)CheckStates.Approving).ToString();
                    organList = organBll.GetOrganQueryWithPaging(pageIndex, pageSize, sort, filterString, paras, ref  pageCount, flowAppList, checkState, loginUserInfo.userID);

                }
                return organList != null ? organList.ToList() : null;
            }
        }
Exemple #2
0
        /// <summary>
        /// 根据传回的XML,添加证照印章表
        /// </summary>
        /// <param name="xele"></param>
        private static string LicensemasterAdd(IEnumerable<XElement> eGFunc)
        {
            try
            {
                if (eGFunc.Count() == 0)
                {
                    return "";
                }
                string strEmployeeID = string.Empty;
                string strOwnerID = string.Empty;
                string strOwnerPostID = string.Empty;
                string strOwnerDepartmentID = string.Empty;
                string strOwnerCompanyID = string.Empty;

                foreach (var q in eGFunc)
                {
                    string strName = q.Attribute("Name").Value;
                    switch (strName)
                    {
                        case "CREATEUSERID":
                            strEmployeeID = q.Attribute("Value").Value;
                            break;
                        case "OWNERID":
                            strOwnerID = q.Attribute("Value").Value;
                            break;
                        case "OWNERPOSTID":
                            strOwnerPostID = q.Attribute("Value").Value;
                            break;
                        case "OWNERDEPARTMENTID":
                            strOwnerDepartmentID = q.Attribute("Value").Value;
                            break;
                        case "OWNERCOMPANYID":
                            strOwnerCompanyID = q.Attribute("Value").Value;
                            break;
                    }
                }

                string employeeid = strEmployeeID.Replace("{", "").Replace("}", "");

                List<T_OA_LICENSEMASTER> lm = new List<T_OA_LICENSEMASTER>();
                T_OA_LICENSEMASTER entity = new T_OA_LICENSEMASTER();

                entity.LICENSEMASTERID = Guid.NewGuid().ToString();
                entity.CREATEDATE = DateTime.Now;
                entity.OWNERID = strOwnerID;
                entity.OWNERPOSTID = strOwnerPostID;
                entity.OWNERDEPARTMENTID = strOwnerDepartmentID;
                entity.OWNERCOMPANYID = strOwnerCompanyID;
                entity.CREATEUSERID = strOwnerID;
                entity.CREATEPOSTID = strOwnerPostID;
                entity.CREATEDEPARTMENTID = strOwnerDepartmentID;
                entity.CREATECOMPANYID = strOwnerCompanyID;
                lm.Add(entity);

                OrganManagementBll organBll = new OrganManagementBll();
                if (organBll.AddOrgan(null, lm))
                {
                    return entity.LICENSEMASTERID;
                }
                else
                {
                    string err = "Error";
                    return err;
                }
            }
            catch (Exception e)
            {
                string abc = "<OA>Message=[" + e.Message + "]" + "<OA>Source=[" + e.Source + "]<OA>StackTrace=[" + e.StackTrace + "]<OA>TargetSite=[" + e.TargetSite + "]";
                Tracer.Debug(abc);
                return abc;
            }
        }
Exemple #3
0
 public List<T_OA_ORGANIZATION> GetOrganListByOrganId(string organID)
 {
     // 在此处添加操作实现
     //DateTime dt1 = DateTime.Now;
     using (OrganManagementBll organBll = new OrganManagementBll())
     {
         IQueryable<T_OA_ORGANIZATION> organList = organBll.GetOrganByOrganId(organID);
         //DateTime dt2 = DateTime.Now;
         //string a = (dt2 - dt1).TotalSeconds.ToString();
         return organList != null ? organList.ToList() : null;
     }
 }
Exemple #4
0
 //删除机构信息
 public bool DeleteOrgan(string[] organCode,ref bool FBControl)
 {
     using (OrganManagementBll organBll = new OrganManagementBll())
     {
         return organBll.DeleteOrgan(organCode, ref FBControl);
     }
 }
Exemple #5
0
 public bool UpdateOrgan(T_OA_ORGANIZATION organObj, List<T_OA_LICENSEMASTER> licenseMasterList)
 {
     using (OrganManagementBll organBll = new OrganManagementBll())
     {
         return organBll.UpdateOrgan(organObj, licenseMasterList);
     }
 }
Exemple #6
0
 private bool IsExistOrgan(string organCode)
 {
     using (OrganManagementBll organBll = new OrganManagementBll())
     {
         return organBll.IsExistOrgan(organCode);
     }
 }
Exemple #7
0
        public string AddOrgan(T_OA_ORGANIZATION organObj,List<T_OA_LICENSEMASTER> licenseMasterList)
        {
            using (OrganManagementBll organBll = new OrganManagementBll())
            {
                string returnStr = "";

                if (!IsExistOrgan(organObj.ORGCODE))
                {
                    if (!organBll.AddOrgan(organObj, licenseMasterList))
                    {
                        returnStr = "添加数据失败";
                    }
                }
                else
                {
                    returnStr = "此机构已经存在,添加数据失败!";
                }
                return returnStr;
            }
        }
Exemple #8
0
 public List<T_OA_LICENSEMASTER> GetLicenseMatsterListByOrganId(string organID)
 {
     // 在此处添加操作实现
     //DateTime dt1 = DateTime.Now;
     using (OrganManagementBll organBll = new OrganManagementBll())
     {
         IQueryable<T_OA_LICENSEMASTER> organList = organBll.GetLicenseMasterListByOrganId(organID);
         //DateTime dt2 = DateTime.Now;
         //string a = (dt2 - dt1).TotalSeconds.ToString();
         return organList != null ? organList.ToList() : null;
     }
 }