public override SuccessResult <AbstractCompanyContacts> CompanyContactsUpsert(AbstractCompanyContacts abstractCompanyContacts) { return(this.abstractCompanyContactsDao.CompanyContactsUpsert(abstractCompanyContacts)); }
public override SuccessResult <AbstractCompanyContacts> CompanyContactsUpsert(AbstractCompanyContacts abstractCompanyContacts) { SuccessResult <AbstractCompanyContacts> company = null; var param = new DynamicParameters(); param.Add("@Id", abstractCompanyContacts.Id, dbType: DbType.Int32, direction: ParameterDirection.Input); param.Add("@FName", abstractCompanyContacts.FName, dbType: DbType.String, direction: ParameterDirection.Input); param.Add("@LName", abstractCompanyContacts.LName, dbType: DbType.String, direction: ParameterDirection.Input); param.Add("@Email", abstractCompanyContacts.Email, dbType: DbType.String, direction: ParameterDirection.Input); param.Add("@CompanyId", abstractCompanyContacts.CompanyId, dbType: DbType.Int32, direction: ParameterDirection.Input); param.Add("@Phone", abstractCompanyContacts.Phone, dbType: DbType.String, direction: ParameterDirection.Input); param.Add("@DepartField", abstractCompanyContacts.DepartField, dbType: DbType.String, direction: ParameterDirection.Input); param.Add("@LoginUserId", ProjectSession.UserID, dbType: DbType.Int32, direction: ParameterDirection.Input); using (SqlConnection con = new SqlConnection(Configurations.ConnectionString)) { var task = con.QueryMultiple(SQLConfig.CompanyContactsUpsert, param, commandType: CommandType.StoredProcedure); company = task.Read <SuccessResult <AbstractCompanyContacts> >().SingleOrDefault(); company.Item = task.Read <CompanyContacts>().SingleOrDefault(); } return(company); }
public abstract SuccessResult <AbstractCompanyContacts> CompanyContactsUpsert(AbstractCompanyContacts abstractCompanyContacts);