public MasterClientApplicationEntity GetSolidQUser(string ConnectionString) { MasterClientApplicationEntity results = new MasterClientApplicationEntity(); results = rep.GetSolidQUser(ConnectionString); return(results); }
internal void UpdateClientApplicationSubDomain(MasterClientApplicationEntity model, int UserId) { StoredProcedureEntity sproc = new StoredProcedureEntity(); sproc.StoredProcedureName = "mapp.AddClientApplication"; sproc.StoredProceduresParameter.Add(GetParam("@ClientId", model.ClientId.ToString().Trim(), SQLServerDatatype.IntDataType)); sproc.StoredProceduresParameter.Add(GetParam("@AppicationSubDomain", model.AppicationSubDomain.ToString(), SQLServerDatatype.VarcharDataType)); sproc.StoredProceduresParameter.Add(GetParam("@ApplicationDBConnectionStringHash", model.ApplicationDBConnectionStringHash.ToString().Trim(), SQLServerDatatype.VarcharDataType)); sproc.StoredProceduresParameter.Add(GetParam("@DBServerName", "", SQLServerDatatype.VarcharDataType)); sproc.StoredProceduresParameter.Add(GetParam("@DBDatabaseName", "", SQLServerDatatype.VarcharDataType)); sproc.StoredProceduresParameter.Add(GetParam("@DBUserName", "", SQLServerDatatype.VarcharDataType)); sproc.StoredProceduresParameter.Add(GetParam("@DBPasswordHash", "", SQLServerDatatype.VarcharDataType)); sproc.StoredProceduresParameter.Add(GetParam("@UserId", UserId.ToString().Trim(), SQLServerDatatype.IntDataType)); sproc.StoredProceduresParameter.Add(GetParam("@Notes", Convert.ToString(model.Notes), SQLServerDatatype.VarcharDataType)); sproc.StoredProceduresParameter.Add(GetParam("@LicenseSKU", Convert.ToString(model.LicenseSKU), SQLServerDatatype.VarcharDataType)); sproc.StoredProceduresParameter.Add(GetParam("@LicenseNumberOfUsers", Convert.ToString(model.LicenseNumberOfUsers), SQLServerDatatype.IntDataType)); sproc.StoredProceduresParameter.Add(GetParam("@LicenseNumberOfTransactions", Convert.ToString(model.LicenseNumberOfTransactions), SQLServerDatatype.IntDataType)); sproc.StoredProceduresParameter.Add(GetParam("@LicenseStartDate", !string.IsNullOrEmpty(Convert.ToString(model.LicenseStartDate)) ? Convert.ToString(model.LicenseStartDate) : null, SQLServerDatatype.DateTimeDataType)); sproc.StoredProceduresParameter.Add(GetParam("@LicenseEndDate", !string.IsNullOrEmpty(Convert.ToString(model.LicenseEndDate)) ? Convert.ToString(model.LicenseEndDate) : null, SQLServerDatatype.DateTimeDataType)); sproc.StoredProceduresParameter.Add(GetParam("@APIKey", model.APIKey == null ? "" : Convert.ToString(model.APIKey), SQLServerDatatype.VarcharDataType)); sproc.StoredProceduresParameter.Add(GetParam("@APISecret", model.APISecret == null ? "" : Convert.ToString(model.APISecret), SQLServerDatatype.VarcharDataType)); sproc.StoredProceduresParameter.Add(GetParam("@PartnerIdP", Convert.ToString(model.PartnerIdP), SQLServerDatatype.VarcharDataType)); sproc.StoredProceduresParameter.Add(GetParam("@Branding", Convert.ToString(model.Branding), SQLServerDatatype.VarcharDataType)); sproc.StoredProceduresParameter.Add(GetParam("@LicenseEntitlements", model.LicenseEntitlements, SQLServerDatatype.VarcharDataType)); sproc.StoredProceduresParameter.Add(GetParam("@ApplicationId", model.ApplicationId == 0 ? null : model.ApplicationId.ToString(), SQLServerDatatype.IntDataType)); sql.ExecuteNoReturn(CommandType.StoredProcedure, sproc); }
public MasterClientApplicationEntity GetClientApplicationDataById(int ApplicationId) { MasterClientApplicationEntity results = new MasterClientApplicationEntity(); results = rep.GetClientApplicationDataById(ApplicationId); return(results); }
public MasterClientApplicationEntity GetSolidQUser(string connctionstring) { MasterClientApplicationEntity results = new MasterClientApplicationEntity(); //General.databaseConnectionString = null; //General.setConnectionString(connctionstring); results = rep.GetSolidQUser(StringCipher.Decrypt(connctionstring, General.passPhrase)); return(results); }
public void AddClientApplication(MasterClientApplicationEntity model, int UserId) { string fullConnectionString = "Data Source=" + model.DBServerName + ";Initial Catalog=" + model.DBDatabaseName + ";Persist Security Info=True;User ID=" + model.DBUserName + ";Password="******";"; model.ApplicationDBConnectionStringHash = StringCipher.Encrypt(fullConnectionString, General.passPhrase); if (model.DBPasswordHash == string.Empty || model.DBPasswordHash == null) { enctyppasswrd = model.DBPasswordHash; } else { enctyppasswrd = StringCipher.Encrypt(model.DBPasswordHash, General.passPhrase); } rep.AddClientApplication(model, UserId, enctyppasswrd, fullConnectionString); }
internal void AddClientApplication(MasterClientApplicationEntity model, int UserId, string enctyppasswrd, string ConntectionString) { try { SqlConnection sqlcon = new SqlConnection(ConntectionString); sqlcon.Open(); StoredProcedureEntity sproc = new StoredProcedureEntity(); sproc.StoredProcedureName = "mapp.AddClientApplication"; sproc.StoredProceduresParameter.Add(GetParam("@ClientId", model.ClientId.ToString().Trim(), SQLServerDatatype.IntDataType)); sproc.StoredProceduresParameter.Add(GetParam("@AppicationSubDomain", model.AppicationSubDomain.ToString(), SQLServerDatatype.VarcharDataType)); sproc.StoredProceduresParameter.Add(GetParam("@ApplicationDBConnectionStringHash", model.ApplicationDBConnectionStringHash.ToString().Trim(), SQLServerDatatype.VarcharDataType)); sproc.StoredProceduresParameter.Add(GetParam("@DBServerName", model.DBServerName.ToString().Trim(), SQLServerDatatype.VarcharDataType)); sproc.StoredProceduresParameter.Add(GetParam("@DBDatabaseName", model.DBDatabaseName.ToString().Trim(), SQLServerDatatype.VarcharDataType)); sproc.StoredProceduresParameter.Add(GetParam("@DBUserName", model.DBUserName.ToString().Trim(), SQLServerDatatype.VarcharDataType)); sproc.StoredProceduresParameter.Add(GetParam("@DBPasswordHash", Convert.ToString(enctyppasswrd), SQLServerDatatype.VarcharDataType)); sproc.StoredProceduresParameter.Add(GetParam("@UserId", UserId.ToString().Trim(), SQLServerDatatype.IntDataType)); sproc.StoredProceduresParameter.Add(GetParam("@Notes", Convert.ToString(model.Notes), SQLServerDatatype.VarcharDataType)); sproc.StoredProceduresParameter.Add(GetParam("@LicenseSKU", Convert.ToString(model.LicenseSKU), SQLServerDatatype.VarcharDataType)); sproc.StoredProceduresParameter.Add(GetParam("@LicenseNumberOfUsers", Convert.ToString(model.LicenseNumberOfUsers), SQLServerDatatype.IntDataType)); sproc.StoredProceduresParameter.Add(GetParam("@LicenseNumberOfTransactions", Convert.ToString(model.LicenseNumberOfTransactions), SQLServerDatatype.IntDataType)); sproc.StoredProceduresParameter.Add(GetParam("@LicenseStartDate", !string.IsNullOrEmpty(Convert.ToString(model.LicenseStartDate)) ? Convert.ToString(model.LicenseStartDate) : null, SQLServerDatatype.DateTimeDataType)); sproc.StoredProceduresParameter.Add(GetParam("@LicenseEndDate", !string.IsNullOrEmpty(Convert.ToString(model.LicenseEndDate)) ? Convert.ToString(model.LicenseEndDate) : null, SQLServerDatatype.DateTimeDataType)); sproc.StoredProceduresParameter.Add(GetParam("@APIKey", model.APIKey == null ? "" : Convert.ToString(model.APIKey), SQLServerDatatype.VarcharDataType)); sproc.StoredProceduresParameter.Add(GetParam("@APISecret", model.APISecret == null ? "" : Convert.ToString(model.APISecret), SQLServerDatatype.VarcharDataType)); sproc.StoredProceduresParameter.Add(GetParam("@PartnerIdP", Convert.ToString(model.PartnerIdP), SQLServerDatatype.VarcharDataType)); sproc.StoredProceduresParameter.Add(GetParam("@Branding", Convert.ToString(model.Branding), SQLServerDatatype.VarcharDataType)); sproc.StoredProceduresParameter.Add(GetParam("@LicenseEntitlements", model.LicenseEntitlements, SQLServerDatatype.VarcharDataType)); sproc.StoredProceduresParameter.Add(GetParam("@ApplicationId", model.ApplicationId == 0 ? null : model.ApplicationId.ToString(), SQLServerDatatype.IntDataType)); int result = (int)sql.ExecuteScalar(CommandType.StoredProcedure, sproc); if (result > 0) { AddClientDataInSolidqUser(model.ClientUserName, model.Email, ConntectionString); } } catch (Exception) { throw; } }
public void UpdateClientApplicationSubDomain(MasterClientApplicationEntity model, int UserId) { rep.UpdateClientApplicationSubDomain(model, UserId); }
public void AddClientApplication(MasterClientApplicationEntity model, int UserId, string enctyppasswrd, string fullConnectionString) { rep.AddClientApplication(model, UserId, enctyppasswrd, fullConnectionString); }