public ActionResult EditCompanyInfo(int CId)
        {
            string url = String.Format("api/Company/GetCompayInfo?CID={0}", CId);
            GetCompayInfoReturnDTO result = _apiAdaptor.Get <GetCompayInfoReturnDTO>(url);

            EditCompanyInfoRequestDTO dto = new EditCompanyInfoRequestDTO()
            {
                CID          = result.CID,
                CompanyName  = result.CompanyName,
                Manager      = result.Manager,
                Sales        = result.Sales,
                AboutUs      = result.AboutUs,
                Address      = result.Address,
                Phone        = result.Phone,
                Tax          = result.Tax,
                EMail        = result.EMail,
                MainProducts = result.MainProducts,
                SiteURL      = result.SiteURL
            };

            return(View(dto));
        }
Example #2
0
        public GetCompayInfoReturnDTO GetCompayInfo(int CID)
        {
            GetCompayInfoReturnDTO returnDto = null;

            returnDto = (from c in _dbContext.Set <Company>()
                         where c.IsEnable == true && c.CID.Equals(CID)
                         select new GetCompayInfoReturnDTO()
            {
                CID = c.CID,
                CompanyName = c.CompanyName,
                Manager = c.Manager,
                Sales = c.Sales,
                AboutUs = c.AboutUs,
                Address = c.Address,
                Phone = c.Phone,
                Tax = c.Tax,
                EMail = c.EMail,
                MainProducts = c.MainProducts,
                SiteURL = c.SiteURL,
            }).FirstOrDefault();

            return(returnDto);
        }