예제 #1
0
 //IsNotificationTaskEnable
 public string IsNotificationTaskEnable(Guid groupsId)
 {
     Domain.Socioboard.Domain.BusinessSetting objbsnssetting = new Domain.Socioboard.Domain.BusinessSetting();
     BusinessSettingRepository busnrepo = new BusinessSettingRepository();
     objbsnssetting = busnrepo.IsNotificationTaskEnable(groupsId);
     return new JavaScriptSerializer().Serialize(objbsnssetting);
 }
예제 #2
0
        public string GetDetailsofBusinessOwner(string GroupId)
        {
            BusinessSettingRepository busnrepo = new BusinessSettingRepository();

            Domain.Socioboard.Domain.BusinessSetting ObjBsnsstng = busnrepo.GetDetailsofBusinessOwner(Guid.Parse(GroupId));
            try
            {
                if (ObjBsnsstng != null)
                {
                    return new JavaScriptSerializer().Serialize(ObjBsnsstng);
                }
                else
                {
                    return new JavaScriptSerializer().Serialize(ObjBsnsstng);
                }

                
            }
            catch (Exception ex)
            {
                
                throw;
                return null;
            }

        }
예제 #3
0
        //IsNotificationTaskEnable
        public string IsNotificationTaskEnable(Guid groupsId)
        {
            Domain.Socioboard.Domain.BusinessSetting objbsnssetting = new Domain.Socioboard.Domain.BusinessSetting();
            BusinessSettingRepository busnrepo = new BusinessSettingRepository();

            objbsnssetting = busnrepo.IsNotificationTaskEnable(groupsId);
            return(new JavaScriptSerializer().Serialize(objbsnssetting));
        }
예제 #4
0
        public string AddBusinessByUser(string ObjBusinessSetting)
        {
            Domain.Socioboard.Domain.BusinessSetting objbsnssetting = (Domain.Socioboard.Domain.BusinessSetting)(new JavaScriptSerializer().Deserialize(ObjBusinessSetting, typeof(Domain.Socioboard.Domain.BusinessSetting)));
            BusinessSettingRepository busnrepo = new BusinessSettingRepository();


            busnrepo.AddBusinessSetting(objbsnssetting);

            return(new JavaScriptSerializer().Serialize(objbsnssetting));
        }
예제 #5
0
        public string AddBusinessByUser(string ObjBusinessSetting)
        {
            Domain.Socioboard.Domain.BusinessSetting objbsnssetting = (Domain.Socioboard.Domain.BusinessSetting)(new JavaScriptSerializer().Deserialize(ObjBusinessSetting, typeof(Domain.Socioboard.Domain.BusinessSetting)));
            BusinessSettingRepository busnrepo = new BusinessSettingRepository();
           
                
                busnrepo.AddBusinessSetting(objbsnssetting);

                return new JavaScriptSerializer().Serialize(objbsnssetting);
            
        }
예제 #6
0
        public string UpdateBuisnessSetting(string ObjBusiNessSetting)
        {
            try
            {
                Domain.Socioboard.Domain.BusinessSetting objbsnssetting = (Domain.Socioboard.Domain.BusinessSetting)(new JavaScriptSerializer().Deserialize(ObjBusiNessSetting, typeof(Domain.Socioboard.Domain.BusinessSetting)));
                BusinessSettingRepository busnrepo = new BusinessSettingRepository();


                busnrepo.AddBusinessSetting(objbsnssetting);

                return(new JavaScriptSerializer().Serialize(objbsnssetting));
            }
            catch (Exception)
            {
                throw;
            }
        }
예제 #7
0
        public string GetDetailsofBusinessOwner(string GroupId)
        {
            BusinessSettingRepository busnrepo = new BusinessSettingRepository();

            Domain.Socioboard.Domain.BusinessSetting ObjBsnsstng = busnrepo.GetDetailsofBusinessOwner(Guid.Parse(GroupId));
            try
            {
                if (ObjBsnsstng != null)
                {
                    return(new JavaScriptSerializer().Serialize(ObjBsnsstng));
                }
                else
                {
                    return(new JavaScriptSerializer().Serialize(ObjBsnsstng));
                }
            }
            catch (Exception ex)
            {
                throw;
                return(null);
            }
        }
예제 #8
0
        public static string AddBusinessSetting(Guid userId, Guid groupsId, string groupsGroupName)
        {
            Domain.Socioboard.Domain.BusinessSetting objbsnssetting = new Domain.Socioboard.Domain.BusinessSetting();
            BusinessSettingRepository busnrepo = new BusinessSettingRepository();

            if (!busnrepo.checkBusinessExists(userId, groupsGroupName))
            {
                objbsnssetting.Id               = Guid.NewGuid();
                objbsnssetting.BusinessName     = groupsGroupName;
                objbsnssetting.GroupId          = groupsId;
                objbsnssetting.AssigningTasks   = false;
                objbsnssetting.AssigningTasks   = false;
                objbsnssetting.TaskNotification = false;
                objbsnssetting.TaskNotification = false;
                objbsnssetting.FbPhotoUpload    = 0;
                objbsnssetting.UserId           = userId;
                objbsnssetting.EntryDate        = DateTime.Now;
                busnrepo.AddBusinessSetting(objbsnssetting);

                return(new JavaScriptSerializer().Serialize(objbsnssetting));
            }
            return(null);
        }
예제 #9
0
        public static string AddBusinessSetting(Guid userId, Guid groupsId, string groupsGroupName)
        {
            Domain.Socioboard.Domain.BusinessSetting objbsnssetting = new Domain.Socioboard.Domain.BusinessSetting();
            BusinessSettingRepository busnrepo = new BusinessSettingRepository();

            if (!busnrepo.checkBusinessExists(userId, groupsGroupName))
            {
                objbsnssetting.Id = Guid.NewGuid();
                objbsnssetting.BusinessName = groupsGroupName;
                objbsnssetting.GroupId = groupsId;
                objbsnssetting.AssigningTasks = false;
                objbsnssetting.AssigningTasks = false;
                objbsnssetting.TaskNotification = false;
                objbsnssetting.TaskNotification = false;
                objbsnssetting.FbPhotoUpload = 0;
                objbsnssetting.UserId = userId;
                objbsnssetting.EntryDate = DateTime.Now;
                busnrepo.AddBusinessSetting(objbsnssetting);

                return new JavaScriptSerializer().Serialize(objbsnssetting);
            }
            return null;
        }
예제 #10
0
        public string Register(string EmailId, string Password, string AccountType, string Username, string ActivationStatus = "0")
        {
            try
            {
                //UserRepository userrepo = new UserRepository();

                //Domain.Socioboard.Domain.UserActivation objUserActivation = new Domain.Socioboard.Domain.UserActivation();
                //UserActivationRepository objUserActivation = new UserActivationRepository();

                logger.Error("Register");

                if (!userrepo.IsUserExist(EmailId))
                {
                    Domain.Socioboard.Domain.User user = new Domain.Socioboard.Domain.User();
                    user.AccountType      = AccountType;
                    user.EmailId          = EmailId;
                    user.CreateDate       = DateTime.Now;
                    user.ExpiryDate       = DateTime.Now.AddMonths(1);
                    user.Password         = Utility.MD5Hash(Password);
                    user.PaymentStatus    = "unpaid";
                    user.ProfileUrl       = string.Empty;
                    user.TimeZone         = string.Empty;
                    user.UserName         = Username;//FirstName + " " + LastName;
                    user.UserStatus       = 1;
                    user.Ewallet          = "0";
                    user.ActivationStatus = ActivationStatus;//"0";
                    user.Id       = Guid.NewGuid();
                    user.UserCode = Utility.GenerateRandomUniqueString();
                    UserRepository.Add(user);

                    ////add value in UserActivation
                    //UserActivation.AddUserActivation(user);

                    //add value in userpackage
                    // UserPackageRelation.AddUserPackageRelation(user);


                    try
                    {
                        Domain.Socioboard.Domain.Groups groups = AddGroupByUserId(user.Id);


                        BusinessSettingRepository busnrepo = new BusinessSettingRepository();
                        BusinessSetting.AddBusinessSetting(user.Id, groups.Id, groups.GroupName);
                        Team.AddTeamByGroupIdUserId(user.Id, user.EmailId, groups.Id);

                        UpdateTeam(EmailId, user.Id.ToString(), user.UserName);
                    }
                    catch (Exception ex)
                    {
                        Console.WriteLine(ex.Message);
                        logger.Error("Error : " + ex.Message);
                        logger.Error("Error : " + ex.StackTrace);
                    }


                    //MailSender.SendEMail(user.UserName, Password, EmailId);
                    return(new JavaScriptSerializer().Serialize(user));
                }
                else
                {
                    return("Email Already Exists");
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.StackTrace);
                return("Something Went Wrong");
            }
        }
예제 #11
0
        public string RegisterbyTwitter(string EmailId, string Password, string AccountType, string Username, string SocioLogin, string PictureUrl, string ActivationStatus = "0")
        {
            try
            {
                logger.Error("RegisterbyTwitter");

                if (!userrepo.IsUserExist(EmailId))
                {
                    Domain.Socioboard.Domain.User user = new Domain.Socioboard.Domain.User();
                    user.AccountType = AccountType;
                    user.EmailId = EmailId;
                    user.CreateDate = DateTime.Now;
                    try
                    {
                        if (ConfigurationManager.AppSettings["expiryindays"].ToString() != "")
                        {
                            double expiryindays = double.Parse(ConfigurationManager.AppSettings["expiryindays"].ToString(), CultureInfo.InvariantCulture.NumberFormat);
                            user.ExpiryDate = DateTime.Now.AddDays(expiryindays);
                        }
                        else
                        {
                            user.ExpiryDate = DateTime.Now.AddDays(30);
                        }
                    }
                    catch (Exception)
                    {
                        user.ExpiryDate = DateTime.Now.AddDays(30);
                    }
                    user.Password = Utility.MD5Hash(Password);
                    user.PaymentStatus = "unpaid";
                    user.ProfileUrl = string.Empty;
                    user.TimeZone = string.Empty;
                    user.UserName = Username;//FirstName + " " + LastName;
                    user.UserStatus = 1;
                    user.Ewallet = "0";
                    user.ActivationStatus = ActivationStatus;//"0"; 
                    user.Id = Guid.NewGuid();
                    user.UserCode = Utility.GenerateRandomUniqueString();
                    user.SocialLogin = SocioLogin;
                    user.ProfileUrl = PictureUrl;
                    UserRepository.Add(user);

                    ////add value in UserActivation
                    //UserActivation.AddUserActivation(user);

                    //add value in userpackage
                    // UserPackageRelation.AddUserPackageRelation(user);


                    try
                    {
                        Domain.Socioboard.Domain.Groups groups = AddGroupByUserId(user.Id);


                        BusinessSettingRepository busnrepo = new BusinessSettingRepository();
                        BusinessSetting.AddBusinessSetting(user.Id, groups.Id, groups.GroupName);
                        Team.AddTeamByGroupIdUserId(user.Id, user.EmailId, groups.Id);

                        UpdateTeam(EmailId, user.Id.ToString(), user.UserName);

                    }
                    catch (Exception ex)
                    {
                        Console.WriteLine(ex.Message);
                        logger.Error("Error : " + ex.Message);
                        logger.Error("Error : " + ex.StackTrace);
                    }
                    //MailSender.SendEMail(user.UserName, Password, EmailId);
                    return new JavaScriptSerializer().Serialize(user);
                }
                else
                {
                    return "Email Already Exists";
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.StackTrace);
                return "Something Went Wrong";
            }
        }
예제 #12
0
        public string Register(string EmailId, string Password, string AccountType, string Username, string ActivationStatus = "0")
        {

            try
            {
                //UserRepository userrepo = new UserRepository();

                //Domain.Socioboard.Domain.UserActivation objUserActivation = new Domain.Socioboard.Domain.UserActivation();
                //UserActivationRepository objUserActivation = new UserActivationRepository();

                logger.Error("Register");

                if (!userrepo.IsUserExist(EmailId))
                {


                    Domain.Socioboard.Domain.User user = new Domain.Socioboard.Domain.User();
                    user.AccountType = AccountType;
                    user.EmailId = EmailId;
                    user.CreateDate = DateTime.Now;
                    user.ExpiryDate = DateTime.Now.AddMonths(1);
                    user.Password = Utility.MD5Hash(Password);
                    user.PaymentStatus = "unpaid";
                    user.ProfileUrl = string.Empty;
                    user.TimeZone = string.Empty;
                    user.UserName = Username;//FirstName + " " + LastName;
                    user.UserStatus = 1;
                    user.Ewallet = "0";
                    user.ActivationStatus = ActivationStatus;//"0"; 
                    user.Id = Guid.NewGuid();
                    user.UserCode = Utility.GenerateRandomUniqueString();
                    UserRepository.Add(user);

                    ////add value in UserActivation
                    //UserActivation.AddUserActivation(user);

                    //add value in userpackage
                    // UserPackageRelation.AddUserPackageRelation(user);


                    try
                    {
                        Domain.Socioboard.Domain.Groups groups = AddGroupByUserId(user.Id);
<<<<<<< HEAD


=======
                        
                        
>>>>>>> e052534b7a2a3744cad9dddbc3c6acccf394ca7b
                        BusinessSettingRepository busnrepo = new BusinessSettingRepository();
                        BusinessSetting.AddBusinessSetting(user.Id, groups.Id, groups.GroupName);
                        Team.AddTeamByGroupIdUserId(user.Id, user.EmailId, groups.Id);

                        UpdateTeam(EmailId, user.Id.ToString(), user.UserName);

                    }
                    catch (Exception ex)
                    {
                        Console.WriteLine(ex.Message);
                        logger.Error("Error : " + ex.Message);
                        logger.Error("Error : " + ex.StackTrace);
                    }


                    //MailSender.SendEMail(user.UserName, Password, EmailId);
                    return new JavaScriptSerializer().Serialize(user);
                }
                else
                {
                    return "Email Already Exists";
                }

            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.StackTrace);
                return "Something Went Wrong";
            }



        }
예제 #13
0
        public string UpdateBuisnessSetting(string ObjBusiNessSetting)
        {
            try
            {
                Domain.Socioboard.Domain.BusinessSetting objbsnssetting = (Domain.Socioboard.Domain.BusinessSetting)(new JavaScriptSerializer().Deserialize(ObjBusiNessSetting, typeof(Domain.Socioboard.Domain.BusinessSetting)));
                BusinessSettingRepository busnrepo = new BusinessSettingRepository();
           
                
                busnrepo.AddBusinessSetting(objbsnssetting);

                return new JavaScriptSerializer().Serialize(objbsnssetting);
            }
            catch (Exception)
            {
                
                throw;
            }
        }
예제 #14
0
        public string RegisterbyTwitter(string EmailId, string Password, string AccountType, string Username, string SocioLogin, string PictureUrl, string ActivationStatus = "0")
        {
            try
            {
                logger.Error("RegisterbyTwitter");

                if (!userrepo.IsUserExist(EmailId))
                {
                    Domain.Socioboard.Domain.User user = new Domain.Socioboard.Domain.User();
                    user.AccountType = AccountType;
                    user.EmailId     = EmailId;
                    user.CreateDate  = DateTime.Now;
                    try
                    {
                        if (ConfigurationManager.AppSettings["expiryindays"].ToString() != "")
                        {
                            double expiryindays = double.Parse(ConfigurationManager.AppSettings["expiryindays"].ToString(), CultureInfo.InvariantCulture.NumberFormat);
                            user.ExpiryDate = DateTime.Now.AddDays(expiryindays);
                        }
                        else
                        {
                            user.ExpiryDate = DateTime.Now.AddDays(30);
                        }
                    }
                    catch (Exception)
                    {
                        user.ExpiryDate = DateTime.Now.AddDays(30);
                    }
                    user.Password         = Utility.MD5Hash(Password);
                    user.PaymentStatus    = "unpaid";
                    user.ProfileUrl       = string.Empty;
                    user.TimeZone         = string.Empty;
                    user.UserName         = Username;//FirstName + " " + LastName;
                    user.UserStatus       = 1;
                    user.Ewallet          = "0";
                    user.ActivationStatus = ActivationStatus;//"0";
                    user.Id          = Guid.NewGuid();
                    user.UserCode    = Utility.GenerateRandomUniqueString();
                    user.SocialLogin = SocioLogin;
                    user.ProfileUrl  = PictureUrl;
                    UserRepository.Add(user);

                    ////add value in UserActivation
                    //UserActivation.AddUserActivation(user);

                    //add value in userpackage
                    // UserPackageRelation.AddUserPackageRelation(user);


                    try
                    {
                        Domain.Socioboard.Domain.Groups groups = AddGroupByUserId(user.Id);


                        BusinessSettingRepository busnrepo = new BusinessSettingRepository();
                        BusinessSetting.AddBusinessSetting(user.Id, groups.Id, groups.GroupName);
                        Team.AddTeamByGroupIdUserId(user.Id, user.EmailId, groups.Id);

                        UpdateTeam(EmailId, user.Id.ToString(), user.UserName);
                    }
                    catch (Exception ex)
                    {
                        Console.WriteLine(ex.Message);
                        logger.Error("Error : " + ex.Message);
                        logger.Error("Error : " + ex.StackTrace);
                    }
                    //MailSender.SendEMail(user.UserName, Password, EmailId);
                    return(new JavaScriptSerializer().Serialize(user));
                }
                else
                {
                    return("Email Already Exists");
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.StackTrace);
                return("Something Went Wrong");
            }
        }