コード例 #1
0
 void Application_Start(object sender, EventArgs e)
 {
     Application["OnlineNumber"] = new TOnlineNumberBll().GetModel();
     Application["OrgShortName"] = new OrganizationBll().GetHighestLevelOrgName(Component.ReadXml("OrgCode").InnerText);
     Application["AllTitle"]     = Component.ReadXml("AllTitle").InnerText;
     new CheckUserBll().CheckUserThere();
 }
コード例 #2
0
ファイル: Default.aspx.cs プロジェクト: chuntian1983/nccqjy
        protected void Bindxz()
        {
            NCPEP.Bll.OrganizationBll orgbll = new OrganizationBll();
            DataTable dt = orgbll.GetAllList();

            this.repxz.DataSource = dt;
            this.repxz.DataBind();
        }
コード例 #3
0
        private string GetOrgID()
        {
            var buf  = new StringBuilder();
            var cBll = new OrganizationBll();
            var list = cBll.selectAll();

            if (list != null)
            {
                foreach (var item in list)
                {
                    buf.AppendFormat("<option value=\"{0}\">{1}</option>", item.WelfareId, item.WelfareName);
                }
            }
            return(buf.ToString());
        }
コード例 #4
0
ファイル: BllProvider.cs プロジェクト: yonglehou/BPMSV1
 public void Dispose()
 {
     this._DataDictionaryBll = null;
     this._EmployeeBll = null;
     this._IPBlacklistBll = null;
     this._MenuInfoBll = null;
     this._OrganizationBll = null;
     this._PurviewInfoBll = null;
     this._RoleInfoBll = null;
     this._RolePurviewBll = null;
     this._SysLogBll = null;
     this._SysLoginLogBll = null;
     this._SystemExceptionLogBll = null;
     this._SystemInfoBll = null;
     this._UserInfoBll = null;
     this._UserPurviewBll = null;
     this._UserRoleBll = null;
 }
コード例 #5
0
        public void OpenApiTestOrganizationGeneral()
        {
            var list = OrganizationBll.Select(new OrganizationListFilter());

            Assert.IsTrue(list.Count > 0);
            var abbr = list[0].Abbreviation;
            var id   = list[0].RecordID;

            list = OrganizationBll.Select(new OrganizationListFilter()
            {
                RecordID = -1
            });
            Assert.IsTrue(list.Count == 0);

            list = OrganizationBll.Select(new OrganizationListFilter()
            {
                Abbreviation = abbr
            });
            Assert.IsTrue(list.Count > 0);//we can have several records with this filter because search is performed using like 'abrr%'

            var org = OrganizationBll.Select(id);

            Assert.IsNotNull(org);

            var orgIn = new Organization()
            {
                LocalAbbreviation = "TEST", LocalOrganizationName = "test", UniqueOrganizationID = "Uniq", Persons = new List <Person>()
            };

            orgIn.Persons.Add(new Person()
            {
                PersonFirstName = "first", PersonLastName = "last"
            });
            var orgOut = OrganizationBll.Create(orgIn);

            Assert.IsNotNull(orgOut);
            Assert.AreNotEqual(0, orgOut.RecordID);
            Assert.IsNotNull(orgOut.Persons);
            Assert.AreEqual(1, orgOut.Persons.Count);
            Assert.AreEqual("first", orgOut.Persons[0].PersonFirstName);

            var prsIn = new Person()
            {
                PersonFirstName = "first1", PersonLastName = "last1"
            };
            var prsOut = OrganizationPersonBll.Create(orgOut.RecordID, prsIn);

            Assert.IsNotNull(prsOut);
            Assert.AreNotEqual(0, prsOut.RecordID);
            Assert.AreEqual("first1", prsOut.PersonFirstName);

            org = OrganizationBll.Select(orgOut.RecordID);
            Assert.IsNotNull(org);
            Assert.AreEqual(orgOut.RecordID, org.RecordID);
            Assert.IsNotNull(org.Persons);
            Assert.AreEqual(2, org.Persons.Count);
            Assert.AreEqual("first", org.Persons[0].PersonFirstName);
            Assert.AreEqual("first1", org.Persons[1].PersonFirstName);

            list = OrganizationBll.Select(new OrganizationListFilter()
            {
                RecordID = orgOut.RecordID
            });
            Assert.IsTrue(list.Count == 1);

            list = OrganizationBll.Select(new OrganizationListFilter()
            {
                Abbreviation = "TEST"
            });
            Assert.IsTrue(list.Count == 1);

            OrganizationPersonBll.Delete(org.RecordID, org.Persons[1].RecordID);
            OrganizationPersonBll.Delete(org.RecordID, org.Persons[0].RecordID);
            OrganizationBll.Delete(org.RecordID);

            //org = OrganizationBll.Select(orgOut.RecordID);
            //Assert.IsNull(org);

            list = OrganizationBll.Select(new OrganizationListFilter()
            {
                RecordID = orgOut.RecordID
            });
            Assert.IsTrue(list.Count == 0);

            list = OrganizationBll.Select(new OrganizationListFilter()
            {
                Abbreviation = "TEST"
            });
            Assert.IsTrue(list.Count == 0);
        }