// Updates client internal string UpdateOISFDCClients(OISFDCClientsEntity model) { string result = string.Empty; try { StoredProcedureEntity sproc = new StoredProcedureEntity(); sproc.StoredProcedureName = "mapp.UpdateOISFDCClients"; // MP-846 Admin database cleanup and code cleanup. sproc.StoredProceduresParameter.Add(GetParam("@OIClientId", model.OIClientId.ToString().Trim(), SQLServerDatatype.IntDataType)); sproc.StoredProceduresParameter.Add(GetParam("@OrgId", model.OrgId, SQLServerDatatype.VarcharDataType)); sproc.StoredProceduresParameter.Add(GetParam("@StartDate", model.StartDate.ToString(), SQLServerDatatype.DateTimeDataType)); sproc.StoredProceduresParameter.Add(GetParam("@EndDate", model.EndDate.ToString(), SQLServerDatatype.DateTimeDataType)); sproc.StoredProceduresParameter.Add(GetParam("@CompanyName", model.CompanyName, SQLServerDatatype.VarcharDataType)); sproc.StoredProceduresParameter.Add(GetParam("@AddressLine1", string.IsNullOrEmpty(model.AddressLine1) ? "" : model.AddressLine1, SQLServerDatatype.VarcharDataType)); sproc.StoredProceduresParameter.Add(GetParam("@AddressLine2", string.IsNullOrEmpty(model.AddressLine2) ? "" : model.AddressLine2, SQLServerDatatype.VarcharDataType)); sproc.StoredProceduresParameter.Add(GetParam("@City", string.IsNullOrEmpty(model.City) ? "" : model.City, SQLServerDatatype.VarcharDataType)); sproc.StoredProceduresParameter.Add(GetParam("@State", string.IsNullOrEmpty(model.State) ? "" : model.State, SQLServerDatatype.VarcharDataType)); sproc.StoredProceduresParameter.Add(GetParam("@PostalCode", string.IsNullOrEmpty(model.PostalCode) ? "" : model.PostalCode, SQLServerDatatype.VarcharDataType)); sproc.StoredProceduresParameter.Add(GetParam("@Country", string.IsNullOrEmpty(model.Country) ? "" : model.Country, SQLServerDatatype.VarcharDataType)); sproc.StoredProceduresParameter.Add(GetParam("@LicenseType", string.IsNullOrEmpty(model.LicenseType) ? "" : model.LicenseType, SQLServerDatatype.VarcharDataType)); sproc.StoredProceduresParameter.Add(GetParam("@LicenseKey", string.IsNullOrEmpty(model.LicenseKey) ? "" : model.LicenseKey, SQLServerDatatype.VarcharDataType)); sproc.StoredProceduresParameter.Add(GetParam("@ContactName", string.IsNullOrEmpty(model.ContactName) ? "" : model.ContactName, SQLServerDatatype.VarcharDataType)); sproc.StoredProceduresParameter.Add(GetParam("@ContactEmail", string.IsNullOrEmpty(model.ContactEmail) ? "" : model.ContactEmail, SQLServerDatatype.VarcharDataType)); sproc.StoredProceduresParameter.Add(GetParam("@ContactPhone", string.IsNullOrEmpty(model.ContactPhone) ? "" : model.ContactPhone, SQLServerDatatype.VarcharDataType)); result = Convert.ToString(sql.ExecuteScalar(CommandType.StoredProcedure, sproc)); return(result); } catch (Exception ex) { result = ex.Message; return(result); } }
// Adds client // MP-846 Admin database cleanup and code cleanup.-MASTER internal string InsertOISFDCClientsForMaster(OISFDCClientsEntity model) { string result = string.Empty; try { StoredProcedureEntity sproc = new StoredProcedureEntity(); sproc.StoredProcedureName = "mapp.InsertOISFDCClients"; sproc.StoredProceduresParameter.Add(GetParam("@OrgId", model.OrgId, SQLServerDatatype.VarcharDataType)); sproc.StoredProceduresParameter.Add(GetParam("@CompanyName", model.CompanyName, SQLServerDatatype.VarcharDataType)); sproc.StoredProceduresParameter.Add(GetParam("@AddressLine1", string.IsNullOrEmpty(model.AddressLine1) ? "" : model.AddressLine1, SQLServerDatatype.VarcharDataType)); sproc.StoredProceduresParameter.Add(GetParam("@AddressLine2", string.IsNullOrEmpty(model.AddressLine2) ? "" : model.AddressLine2, SQLServerDatatype.VarcharDataType)); sproc.StoredProceduresParameter.Add(GetParam("@City", string.IsNullOrEmpty(model.City) ? "" : model.City, SQLServerDatatype.VarcharDataType)); sproc.StoredProceduresParameter.Add(GetParam("@State", string.IsNullOrEmpty(model.State) ? "" : model.State, SQLServerDatatype.VarcharDataType)); sproc.StoredProceduresParameter.Add(GetParam("@PostalCode", string.IsNullOrEmpty(model.PostalCode) ? "" : model.PostalCode, SQLServerDatatype.VarcharDataType)); sproc.StoredProceduresParameter.Add(GetParam("@Country", string.IsNullOrEmpty(model.Country) ? "" : model.Country, SQLServerDatatype.VarcharDataType)); sproc.StoredProceduresParameter.Add(GetParam("@LicenseKey", string.IsNullOrEmpty(model.LicenseKey) ? "" : model.LicenseKey, SQLServerDatatype.VarcharDataType)); sproc.StoredProceduresParameter.Add(GetParam("@ContactName", string.IsNullOrEmpty(model.ContactName) ? "" : model.ContactName, SQLServerDatatype.VarcharDataType)); sproc.StoredProceduresParameter.Add(GetParam("@ContactEmail", string.IsNullOrEmpty(model.ContactEmail) ? "" : model.ContactEmail, SQLServerDatatype.VarcharDataType)); sproc.StoredProceduresParameter.Add(GetParam("@ContactPhone", string.IsNullOrEmpty(model.ContactPhone) ? "" : model.ContactPhone, SQLServerDatatype.VarcharDataType)); result = Convert.ToString(sql.ExecuteScalar(CommandType.StoredProcedure, sproc)); return(result); } catch (Exception ex) { result = ex.Message; return(result); } }
// Get all client details to Updates client public OISFDCClientsEntity GetOISFDCClientsByOIClientIdforUpdate(int OIClientId) { OISFDCClientsEntity results = new OISFDCClientsEntity(); results = rep.GetOISFDCClientsByOIClientIdforUpdate(OIClientId); return(results); }
// Updates client public string UpdateOISFDCClients(OISFDCClientsEntity model) { return(rep.UpdateOISFDCClients(model)); }
// Adds client // MP-846 Admin database cleanup and code cleanup.-MASTER public string InsertOISFDCClientsForMaster(OISFDCClientsEntity model) { return(rep.InsertOISFDCClientsForMaster(model)); }