Example #1
0
 private bool IsBorrowed(string licenseID)
 {
     using (LicenseBorrowBll licenseBorrowBll = new LicenseBorrowBll())
     {
         return(licenseBorrowBll.IsBorrowed(licenseID));
     }
 }
Example #2
0
 public T_OA_LICENSEUSER GetLicenseBorrowListById(string licenseID)
 {
     using (LicenseBorrowBll licenseBorrowBll = new LicenseBorrowBll())
     {
         return(licenseBorrowBll.GetLicenseById(licenseID));
     }
 }
Example #3
0
        public string DeleteLicenseBorrow(string[] licenseID)
        {
            string returnStr = "";

            using (LicenseBorrowBll licenseBorrowBll = new LicenseBorrowBll())
            {
                if (!licenseBorrowBll.DeleteLicenseBorrow(licenseID))
                {
                    returnStr = "删除数据失败";
                }
                return(returnStr);
            }
        }
Example #4
0
        public string UpdateLicenseBorrow(T_OA_LICENSEUSER licenseObj)
        {
            string returnStr = "";

            using (LicenseBorrowBll licenseBorrowBll = new LicenseBorrowBll())
            {
                if (!licenseBorrowBll.UpdateLicenseBorrow(licenseObj))
                {
                    returnStr = "更新数据失败";
                }
                return(returnStr);
            }
        }
Example #5
0
        public string AddLicenseBorrow(T_OA_LICENSEUSER licenseObj)
        {
            string returnStr = "";

            using (LicenseBorrowBll licenseBorrowBll = new LicenseBorrowBll())
            {
                if (IsBorrowed(licenseObj.T_OA_LICENSEMASTER.LICENSEMASTERID))
                {
                    if (!licenseBorrowBll.AddLicenseBorrow(licenseObj))
                    {
                        returnStr = "添加数据失败";
                    }
                }
                else
                {
                    returnStr = "此证照已借出!";
                }
                return(returnStr);
            }
        }
Example #6
0
        public List <T_OA_LICENSEUSER> GetLicenseBorrowList(int pageIndex, int pageSize, string sort, string filterString, object[] paras, ref int pageCount, string checkState, LoginUserInfo loginUserInfo)
        {
            IQueryable <T_OA_LICENSEUSER> licenseList = null;

            using (LicenseBorrowBll licenseBorrowBll = new LicenseBorrowBll())
            {
                if (checkState != ((int)CheckStates.WaittingApproval).ToString())
                {
                    if (checkState != ((int)CheckStates.ALL).ToString())
                    {
                        licenseList = licenseBorrowBll.GetLicenseQueryWithPaging(pageIndex, pageSize, sort, filterString, paras, ref pageCount, null, checkState, loginUserInfo.userID);
                    }
                    else
                    {
                        licenseList = licenseBorrowBll.GetLicenseQueryWithPaging(pageIndex, pageSize, sort, filterString, paras, ref pageCount, null, "", loginUserInfo.userID);
                    }
                }
                else
                {
                    FLOW_FLOWRECORDDETAIL_T[] flowList = workFlowWS.GetFlowInfo("", "", "", "0", "licenseBorrow", 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();
                    licenseList = licenseBorrowBll.GetLicenseQueryWithPaging(pageIndex, pageSize, sort, filterString, paras, ref pageCount, flowAppList, checkState, loginUserInfo.userID);
                }
                return(licenseList != null?licenseList.ToList() : null);
            }
        }
Example #7
0
        /// <summary>
        /// 根据传回的XML,添加证照印章外借记录
        /// </summary>
        /// <param name="xele"></param>
        private static string LicenseuserAdd(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("}", "");

                T_OA_LICENSEUSER entity = new T_OA_LICENSEUSER();

                entity.LICENSEUSERID = 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;

                LicenseBorrowBll licenseBorrowBll = new LicenseBorrowBll();
                if (licenseBorrowBll.AddLicenseBorrow(entity))
                {
                    return entity.LICENSEUSERID;
                }
                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;
            }
        }
Example #8
0
 public string DeleteLicenseBorrow(string[] licenseID)
 {
     string returnStr = "";
     using (LicenseBorrowBll licenseBorrowBll = new LicenseBorrowBll())
     {
         if (!licenseBorrowBll.DeleteLicenseBorrow(licenseID))
         {
             returnStr = "删除数据失败";
         }
         return returnStr;
     }
 }
Example #9
0
 public string UpdateLicenseBorrow(T_OA_LICENSEUSER licenseObj)
 {
     string returnStr = "";
     using (LicenseBorrowBll licenseBorrowBll = new LicenseBorrowBll())
     {
         if (!licenseBorrowBll.UpdateLicenseBorrow(licenseObj))
         {
             returnStr = "更新数据失败";
         }
         return returnStr;
     }
 }
Example #10
0
 private bool IsBorrowed(string licenseID)
 {
     using (LicenseBorrowBll licenseBorrowBll = new LicenseBorrowBll())
     {
         return licenseBorrowBll.IsBorrowed(licenseID);
     }
 }
Example #11
0
 public string AddLicenseBorrow(T_OA_LICENSEUSER licenseObj)
 {
     string returnStr = "";
     using (LicenseBorrowBll licenseBorrowBll = new LicenseBorrowBll())
     {
         if (IsBorrowed(licenseObj.T_OA_LICENSEMASTER.LICENSEMASTERID))
         {
             if (!licenseBorrowBll.AddLicenseBorrow(licenseObj))
             {
                 returnStr = "添加数据失败";
             }
         }
         else
         {
             returnStr = "此证照已借出!";
         }
         return returnStr;
     }
 }
Example #12
0
 public T_OA_LICENSEUSER GetLicenseBorrowListById(string licenseID)
 {
     using (LicenseBorrowBll licenseBorrowBll = new LicenseBorrowBll())
     {
         return licenseBorrowBll.GetLicenseById(licenseID);
     }
 }
Example #13
0
 public List<T_OA_LICENSEUSER> GetLicenseBorrowList(int pageIndex, int pageSize, string sort, string filterString, object[] paras, ref int pageCount, string checkState, LoginUserInfo loginUserInfo)
 {
     IQueryable<T_OA_LICENSEUSER> licenseList = null;
     using (LicenseBorrowBll licenseBorrowBll = new LicenseBorrowBll())
     {
         if (checkState != ((int)CheckStates.WaittingApproval).ToString())
         {
             if (checkState != ((int)CheckStates.ALL).ToString())
             {
                 licenseList = licenseBorrowBll.GetLicenseQueryWithPaging(pageIndex, pageSize, sort, filterString, paras, ref  pageCount, null, checkState, loginUserInfo.userID);
             }
             else
             {
                 licenseList = licenseBorrowBll.GetLicenseQueryWithPaging(pageIndex, pageSize, sort, filterString, paras, ref  pageCount, null, "", loginUserInfo.userID);
             }
         }
         else
         {
             FLOW_FLOWRECORDDETAIL_T[] flowList = workFlowWS.GetFlowInfo("", "", "", "0", "licenseBorrow", 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();
             licenseList = licenseBorrowBll.GetLicenseQueryWithPaging(pageIndex, pageSize, sort, filterString, paras, ref  pageCount, flowAppList, checkState, loginUserInfo.userID);
         }
         return licenseList != null ? licenseList.ToList() : null;
     }
 }