コード例 #1
0
        private void FRM_Organization_Load(object sender, EventArgs e)
        {
            try
            {
                HelperClass.FillSearchLookUpByData(SearchCity, new CityManager().CreateTable(),
                                                   CityManager.CityDetails.CityName.ToString(),
                                                   CityManager.CityDetails.CityCode.ToString());



                org                  = orgManager.Get(1);
                txtName.Text         = org.OrganizationName;
                txtAddress.Text      = org.Address;
                SearchCity.EditValue = org.City_Code;
                txtPhone.Text        = org.Phone;
                txtMobile.Text       = org.Mobile;
                txtFax.Text          = org.Fax;
                txtWebsite.Text      = org.Website;
                txtEmail.Text        = org.EMail;

                picLogo.Image = org.Logo == null ? null : Image.FromStream(new MemoryStream(org.Logo));
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
コード例 #2
0
        // GET: /Organizations/Delete/1

        public ActionResult Delete(int id)
        {
            var organization = _organizationManager.Get(id);

            if (organization == null)
            {
                return(HttpNotFound());
            }

            _organizationManager.Remove(organization);
            return(View("OrgList"));
        }
コード例 #3
0
ファイル: OrganizationInit.cs プロジェクト: tiansuhu/MyBLOG
        public static void init()
        {
            Organization org = new Organization();

            org.id          = "od9a2123-2151-43cf-b8f0-384dbf763740";
            org.createrTime = System.DateTime.Now;
            org.creater     = "ad9a2123-2151-43cf-b8f0-384dbf763741";
            org.orgCode     = "MyCompany";
            org.orgName     = "我的公司";
            org.isroot      = true;
            //初始化表
            manager.InitTable();
            Organization vorg = manager.Get(org.id);//验证当前user是否已经存在

            //不存在就初始化当前数据
            if (vorg == null || string.IsNullOrEmpty(vorg.id))
            {
                //插入数据
                manager.Add(org);
            }
        }
コード例 #4
0
        private DeptInfo InitialData()
        {
            IOrganizationManager target = new OrganizationManager();
            OrganizationInfo org = target.Get(new Guid("ecced713-2966-4f09-acbe-9e9c2bdbd14b"));

            DeptInfo info = new DeptInfo();
            info.Organization = org;
            info.DeptNo = "10000";
            info.Name = "销售部";
            info.SortNO = 1;
            return info;
        }
コード例 #5
0
        public JsonResult GetSingleOrganizationbyId(int id)
        {
            var org = _organizationManager.Get(id);

            return(Json(org, JsonRequestBehavior.AllowGet));
        }
コード例 #6
0
        private RoleInfo InitialData()
        {
            IOrganizationManager target = new OrganizationManager();
            OrganizationInfo org = target.Get(new Guid("ecced713-2966-4f09-acbe-9e9c2bdbd14b"));

            RoleInfo info = new RoleInfo();
            info.Organization = org;
            info.Name = "营业员";
            info.SortNO = 1;
            return info;
        }