Ejemplo n.º 1
0
        // 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);
            }
        }
Ejemplo n.º 2
0
        // 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);
            }
        }
Ejemplo n.º 3
0
        // Get all client details to Updates client
        public OISFDCClientsEntity GetOISFDCClientsByOIClientIdforUpdate(int OIClientId)
        {
            OISFDCClientsEntity results = new OISFDCClientsEntity();

            results = rep.GetOISFDCClientsByOIClientIdforUpdate(OIClientId);
            return(results);
        }
Ejemplo n.º 4
0
 // Updates client
 public string UpdateOISFDCClients(OISFDCClientsEntity model)
 {
     return(rep.UpdateOISFDCClients(model));
 }
Ejemplo n.º 5
0
 // Adds client
 // MP-846 Admin database cleanup and code cleanup.-MASTER
 public string InsertOISFDCClientsForMaster(OISFDCClientsEntity model)
 {
     return(rep.InsertOISFDCClientsForMaster(model));
 }