public string UpdateCompanyInfo(CompanyInfo companyInfo)
        {
            try
            {
                //if (Helper.Encrypt("bhuvicare").Equals(lineOfBusiness.UserInfo.UserName) && Helper.Encrypt("BhuviCare@004").Equals(lineOfBusiness.UserInfo.Password))
                //{
                Business business = new Business();
                return business.UpdateCompanyInfo(companyInfo);
                //}

                //return "Invalid Credentials";
            }
            catch (Exception ex)
            {
                return ex.Message;
            }
        }
Esempio n. 2
0
        public List<CompanyInfo> CompanyInfo(int Id)
        {
            List<CompanyInfo> lstInfo = new List<CompanyInfo>();
            using (DataSet ds = dataAccess.GetCompanyInfoData(Id))
            {
                if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
                {
                    foreach (DataRow dataRow in ds.Tables[0].Rows)
                    {
                        CompanyInfo companyData = new CompanyInfo()
                        {
                            Id = Helper.ConvertToInt(dataRow["Id"]),
                            Header = Helper.GetDbValue(dataRow["Header"]),
                            Content = Helper.GetDbValue(dataRow["Content"]),
                            ImageUrl = Helper.GetDbValue(dataRow["ImageUrl"]),
                            PageTitle = Helper.GetDbValue(dataRow["PageTitle"]),
                        };
                        lstInfo.Add(companyData);
                    }
                }
            }

            return lstInfo;
        }
Esempio n. 3
0
 public void UpdateUpdateCompanyInfo(CompanyInfo companyInfo)
 {
     string query = string.Empty;
     query = "UPDATE [tblCompanyInfo] SET ImageUrl = '" + companyInfo.ImageUrl + "',Header='" + companyInfo.Header + "' ,Content = '" + companyInfo.Content + "' WHERE [id] =" + companyInfo.Id;
     ExecuteNonQuery(query);
 }
Esempio n. 4
0
 public string UpdateCompanyInfo(CompanyInfo companyInfo)
 {
     try
     {
         dataAccess.UpdateUpdateCompanyInfo(companyInfo);
         return "OK";
     }
     catch (Exception ex)
     {
         throw;
     }
 }