示例#1
0
 void btnSave_Click(object sender, EventArgs e)
 {
     if (!string.IsNullOrEmpty(this.txtSupTypeName.Text) && !string.IsNullOrEmpty(this.txtSupTypeCode.Text))
     {
         using (MMSProDBDataContext db = new MMSProDBDataContext(ConfigurationManager.ConnectionStrings["mmsConString"].ConnectionString))
         {
             //检查唯一性
             var temp = db.SupplierType.SingleOrDefault(a => a.SupplierTypeCode == this.txtSupTypeCode.Text.Trim());
             if (temp == null)
             {
                 SupplierType ei = new SupplierType();
                 ei.SupplierTypeName = this.txtSupTypeName.Text.Trim();
                 ei.SupplierTypeCode = this.txtSupTypeCode.Text.Trim();
                 ei.Remark           = this.txtRemark.Text.Trim();
                 db.SupplierType.InsertOnSubmit(ei);
                 db.SubmitChanges();
                 Response.Redirect("SupTypeManager.aspx");
             }
             else
             {
                 ClientScript.RegisterClientScriptBlock(typeof(string), "ShowMessage", "<script>alert('类别编码已存在')</script>");
             }
         }
     }
 }
        public IEnumerable <SupplierWithPartsModel> AllWithParts(SupplierType type)
        {
            var suppliers = db.Suppliers.AsQueryable();

            switch (type)
            {
            case SupplierType.Local:
                suppliers = suppliers
                            .Where(s => !s.IsImporter);


                break;

            case SupplierType.Importers:
                suppliers = suppliers
                            .Where(s => s.IsImporter);

                break;
            }

            return(suppliers
                   .Select(s => new SupplierWithPartsModel()
            {
                Name = s.Name,
                Id = s.Id,
                NumberOfParts = s.Parts.Count
            })
                   .ToList());
        }
示例#3
0
        private void FormSupplierEdit_Load(object sender, EventArgs e)
        {
            this.textBoxCredit.Text  = "0";
            this.textBoxVatRate.Text = "17";

            if (!m_isAdd)
            {
                this.buttonAdd.Enabled           = false;
                this.buttonSupplierGroup.Enabled = false;

                if (m_isEditSupplier)
                {
                    m_supplier = Supplier.getInctance().getSupplierInfoFromPkey(m_supplierPkey);
                }
                else
                {
                    m_supplierType    = SupplierType.getInctance().getSupplierTypeInfoFromPkey(m_supplierGroupPkey);
                    m_isSupplierGroup = true;
                }

                setPageActiveState();
                setPageActiveValue();
            }

            // 初始化区域下拉框值
            ComboBoxExtend.initComboBox(this.comboBoxArea, "BASE_AREA_LIST");
        }
示例#4
0
        /// <inheritdoc/>
        public string ToDelimitedString()
        {
            CultureInfo culture = CultureInfo.CurrentCulture;

            return(string.Format(
                       culture,
                       StringHelper.StringFormatSequence(0, 22, Configuration.FieldSeparator),
                       Id,
                       ContractIdentifier?.ToDelimitedString(),
                       ContractDescription,
                       ContractStatus?.ToDelimitedString(),
                       EffectiveDate.HasValue ? EffectiveDate.Value.ToString(Consts.DateTimeFormatPrecisionSecond, culture) : null,
                       ExpirationDate.HasValue ? ExpirationDate.Value.ToString(Consts.DateTimeFormatPrecisionSecond, culture) : null,
                       ContractOwnerName?.ToDelimitedString(),
                       ContractOriginatorName?.ToDelimitedString(),
                       SupplierType?.ToDelimitedString(),
                       ContractType?.ToDelimitedString(),
                       FreeOnBoardFreightTerms?.ToDelimitedString(),
                       PriceProtectionDate.HasValue ? PriceProtectionDate.Value.ToString(Consts.DateTimeFormatPrecisionSecond, culture) : null,
                       FixedPriceContractIndicator?.ToDelimitedString(),
                       GroupPurchasingOrganization?.ToDelimitedString(),
                       MaximumMarkup?.ToDelimitedString(),
                       ActualMarkup?.ToDelimitedString(),
                       Corporation != null ? string.Join(Configuration.FieldRepeatSeparator, Corporation.Select(x => x.ToDelimitedString())) : null,
                       ParentOfCorporation?.ToDelimitedString(),
                       PricingTierLevel?.ToDelimitedString(),
                       ContractPriority,
                       ClassOfTrade?.ToDelimitedString(),
                       AssociatedContractId?.ToDelimitedString()
                       ).TrimEnd(Configuration.FieldSeparator.ToCharArray()));
        }
示例#5
0
        protected override SupplierEntity entityFromReader(SqlDataReader reader)
        {
            //inputs the data from the database into useable data in the program. 
            string name = (string) reader["Name"];
            string note = (string) reader["Note"];
            SupplierType type = (SupplierType) Enum.Parse(typeof (SupplierType), reader["Type"].ToString());
            string accountNo = (string) reader["AccountNo"];
            string accountName = (string) reader["AccountName"];
            string ownerId = (string) reader["OwnerId"];
            string bank = (string) reader["Bank"];
            AccountType accountType = (AccountType) Enum.Parse(typeof (AccountType), reader["AccountType"].ToString());

            int id = (int)reader["PartyId"];
            DateTime lastModified = (DateTime)reader["LastModified"];
            bool deleted = (bool)reader["Deleted"];

            SupplierEntity supplierEntity = new SupplierEntity(type, note, name);
            supplierEntity.Id = id;
            supplierEntity.LastModified = lastModified;
            supplierEntity.Deleted = deleted;
            supplierEntity.AccountNo = accountNo;
            supplierEntity.AccountName = accountName;
            supplierEntity.OwnerId = ownerId;
            supplierEntity.AccountType = accountType;
            supplierEntity.Bank = bank;

            return supplierEntity;
        }
示例#6
0
 internal SupplierEntity Create(string name, string note, SupplierType type)
 {
     //Creates a new supplier with type name and note, and inserts to database.
     SupplierEntity supplierEntity = new SupplierEntity(type, note, name);
     insert(supplierEntity);
     return supplierEntity;
 }
        public ISupplier CreateSupplier(string name, string note, SupplierType type)
        {
            SupplierEntity entity = new SupplierEntity(type, note, name);
            supplierList.Add(entity);

            return entity;
        }
示例#8
0
        void Detail()
        {
            try
            {
                int id = Convert.ToInt32(lv_List.SelectedItems[0].Text);

                Supplier sp = SupplierDAO.Instance.GetSupplierInfoByid(id);

                txt_Name.Text    = sp.Name;
                txt_address.Text = sp.Address;
                txt_Phone.Text   = sp.Phone;

                SupplierType st = SupplierTypeDAO.Instance.GetTypeByIDSupplier(id);

                int index = -1;
                int i     = 0;

                foreach (SupplierType item in cbb_Group.Items)
                {
                    if (item.ID == sp.ID)
                    {
                        index = i;
                        break;
                    }
                    i++;
                }
                cbb_Group.SelectedIndex = i;
            }
            catch
            {
                return;
            }
        }
示例#9
0
        protected override void ShowItemInGridViewRow(DataGridViewRow row, object item)
        {
            CompanyInfo c = item as CompanyInfo;

            row.Tag = c;
            row.Cells["colImage"].Value = Properties.Resources.customer;
            row.Cells["colID"].Value    = c.ID;
            row.Cells["colName"].Value  = c.Name;
            SupplierType st = categoryTree.GetSupplierType(c.CategoryID);

            row.Cells["colCategory"].Value   = st != null ? st.Name : string.Empty;
            row.Cells["colNation"].Value     = c.Nation;
            row.Cells["colCity"].Value       = c.City;
            row.Cells["colWebsite"].Value    = c.Website;
            row.Cells["colTelphone"].Value   = c.TelPhone;
            row.Cells["colFax"].Value        = c.Fax;
            row.Cells["colAddress"].Value    = c.Address;
            row.Cells["colPostalCode"].Value = c.PostalCode;
            row.Cells["colMemo"].Value       = c.Memo;
            if (_Suppliers == null || !_Suppliers.Exists(it => it.ID == c.ID))
            {
                if (_Suppliers == null)
                {
                    _Suppliers = new List <CompanyInfo>();
                }
                _Suppliers.Add(c);
            }
        }
示例#10
0
 public void UpdateSupplierType(SupplierType model)
 {
     using (var uow = new LookupsUnitOfWork()) {
         uow.LookupsRespository.UpdateSupplierType(model);
         uow.Save();
     }
 }
示例#11
0
        public IActionResult GetSummary([FromQuery] SupplierType supplierType, [FromQuery] DateTimeOffset date)
        {
            try
            {
                VerifyUser();

                var data = _service.GetReport(supplierType, date);

                return(Ok(new
                {
                    apiVersion = ApiVersion,
                    data = data,
                    info = new
                    {
                        Count = data.Count,
                        Order = new List <string>(),
                        Selected = new List <string>()
                    },
                    message = General.OK_MESSAGE,
                    statusCode = General.OK_STATUS_CODE
                }));
            }
            catch (Exception e)
            {
                var result =
                    new ResultFormatter(ApiVersion, General.INTERNAL_ERROR_STATUS_CODE, e.Message)
                    .Fail();
                return(StatusCode(General.INTERNAL_ERROR_STATUS_CODE, result));
            }
        }
        public JsonResult EditSupplierType(FormCollection form)
        {
            var apiResult = new APIResult();

            try
            {
                var          opt   = form["opt"];
                SupplierType model = new SupplierType();
                model.Name = form["name"];
                if (opt == "0")
                {
                    model.Pid = Convert.ToInt64(form["id"]);
                }
                else
                {
                    model.Id = Convert.ToInt64(form["id"]);
                }

                SupplierTypeBll.AddOrUpdate(model, UserContext.CurrentUser.Name, UserContext.CurrentUser.HotelId);
            }
            catch (Exception ex)
            {
                apiResult.Ret = -1;
                apiResult.Msg = ex.Message;
                if (!(ex is OperationExceptionFacade))
                {
                    LogFactory.GetLogger().Log(LogLevel.Error, ex);
                }
            }

            return(Json(apiResult));
        }
        public ICollection <SupplierModel> All(SupplierType type)
        {
            var suppliers = this.dbContext.Suppliers.AsQueryable();

            switch (type)
            {
            case SupplierType.Local:
                suppliers = suppliers
                            .Where(s => !s.IsImporter);
                break;

            case SupplierType.Importer:
                suppliers = suppliers
                            .Where(s => s.IsImporter);
                break;

            default:
                throw new InvalidOperationException($"Invalid supplier type: {type}");
            }

            return(suppliers
                   .Select(s => new SupplierModel
            {
                Id = s.Id,
                Name = s.Name,
                PartsCount = s.Parts.Count
            }).ToList());
        }
示例#14
0
        private SupplierType Create_Supplier_Type_Details_From_Data_Row(DataRow dataRow)
        {
            SupplierType Supplier_Type_To_Return = new SupplierType();

            Supplier_Type_To_Return.Supplier_Type_Id = Convert.ToInt16(dataRow["Supplier_Type_Id"]);
            Supplier_Type_To_Return.Type_Name        = dataRow["Type_Name"].ToString();
            Supplier_Type_To_Return.Type_Code        = dataRow["Type_Code"].ToString();
            Supplier_Type_To_Return.Description      = dataRow["Description"].ToString();

            if (dataRow.Table.Columns.IndexOf("Record_Created_By_User_Id") > -1)
            {
                Supplier_Type_To_Return.Record_Created_By_User_Id    = (int)dataRow["Record_Created_By_User_Id"];
                Supplier_Type_To_Return.Record_Creation_DateTime_UTC = (DateTime)dataRow["Record_Creation_DateTime_UTC"];
            }

            if (dataRow.Table.Columns.IndexOf("Record_Last_Updated_By_User_Id") > -1)
            {
                Supplier_Type_To_Return.Record_Last_Updated_By_User_Id   = (int)dataRow["Record_Last_Updated_By_User_Id"];
                Supplier_Type_To_Return.Record_Last_Updated_DateTime_UTC = (DateTime)dataRow["Record_Last_Updated_DateTime_UTC"];
            }

            if (dataRow.Table.Columns.IndexOf("Is_Active") > -1)
            {
                Supplier_Type_To_Return.Is_Active = (bool)dataRow["Is_Active"];
            }

            if (dataRow.Table.Columns.IndexOf("Is_Visible") > -1)
            {
                Supplier_Type_To_Return.Is_Active = (bool)dataRow["Is_Visible"];
            }

            return(Supplier_Type_To_Return);
        }
示例#15
0
        public ActionResult Edit(int id)
        {
            SupplierType obj = GetById(id);

            ViewData["SuppliewsId"] = id;
            return(View(obj));
        }
示例#16
0
        public List <SupplierType> GetSupplierType(string lang)
        {
            UserQuery userQuery = new UserQuery(language);

            System.Data.DataTable dataTable;



            SupplierType type;

            dataTable = conn_db.ReadTable(userQuery.GetMasterTranslated("suppliertype", lang));

            List <SupplierType> workshopTypes = new List <SupplierType>();

            if (dataTable.Rows.Count == 0)
            {
                throw new EmptyViewException(language);
            }


            foreach (System.Data.DataRow row in dataTable.Rows)
            {
                type          = new SupplierType();
                type.id       = Convert.ToInt32(row["ID"].ToString());
                type.typeName = row["suppliertype_name"].ToString();
                workshopTypes.Add(type);
            }


            return(workshopTypes);
        }
示例#17
0
        public static Supplier CreateSupplier(SupplierType sType, string filename = "")
        {
            Supplier retval;

            switch (sType)
            {
            case SupplierType.MMT:
                retval = new MMTSupplier();
                break;

            case SupplierType.TechData:
                retval = new TechDataSupplier(filename);
                break;

            case SupplierType.Wavelink:
                retval = new WavelinkSupplier(filename);
                break;

            default:
                retval = new DickerDataSupplier(filename);
                break;
            }

            return(retval);
        }
        protected override void ShowItemInGridViewRow(DataGridViewRow row, object item)
        {
            SupplierType ct = item as SupplierType;

            row.Cells["colName"].Value = ct.Name;
            row.Cells["colMemo"].Value = ct.Memo;
        }
        public async Task <IActionResult> Edit(int id, [Bind("SupplierTypeId,Type")] SupplierType supplierType)
        {
            if (id != supplierType.SupplierTypeId)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(supplierType);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!SupplierTypeExists(supplierType.SupplierTypeId))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(supplierType));
        }
示例#20
0
        internal Supplier Create(string name, string note, SupplierType type)
        {
            Supplier supplier = new Supplier(name, note, type, dataAccessFacade);
            suppliers.Add(supplier);

            return supplier;
        }
        public ActionResult _UpdateSupplierTypes(SupplierType ins)
        {
            //...Update Object
            SupplierType ins2 = SupplierTRep.Update(ins);

            //...Repopulate Grid...
            return(View(new GridModel(SupplierTRep.GetAllSupplierType())));
        }
        public ISupplier CreateSupplier(string name, string note, SupplierType type)
        {
            SupplierEntity entity = new SupplierEntity(type, note, name);

            supplierList.Add(entity);

            return(entity);
        }
        protected void dgSupplier_SelectedIndexChanged(object sender, EventArgs e)
        {
            int suppliertypeid = (int)dgSupplier.DataKeys[dgSupplier.SelectedIndex];

            Session["SupplierTypeId"] = suppliertypeid;
            _SupplierType             = _presenter.GetSupplierTypeById(suppliertypeid);
            Session["SupplierType"]   = _SupplierType;
        }
示例#24
0
        internal Supplier Create(string name, string note, SupplierType type)
        {
            Supplier supplier = new Supplier(name, note, type, dataAccessFacade);

            suppliers.Add(supplier);

            return(supplier);
        }
示例#25
0
        public ActionResult CreateSupplierType(SupplierType model, HttpPostedFileBase file)
        {
            if (ModelState.IsValid)
            {
            }

            return(RedirectToAction("GetSupplierTypes"));
        }
示例#26
0
        public ActionResult DeleteConfirmed(int id)
        {
            SupplierType supplierType = db.SupplierTypes.Find(id);

            db.SupplierTypes.Remove(supplierType);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
示例#27
0
 internal Supplier(string name, string note, SupplierType type, IDataAccessFacade dataAccessFacade)
 {
     //Calls validation on "name" for securing right input.
     validateName(name);
     this.dataAccessFacade = dataAccessFacade;
     _supplierEntity = dataAccessFacade.CreateSupplier(name, note, type);
     //Calls party class to put supplierentity as a party.
     initializeParty(_supplierEntity);
 }
示例#28
0
        public ActionResult DeletesupplierTypeConfirmed(int id)
        {
            SupplierType suppliertype = db.SupplierTypes.Find(id);

            db.SupplierTypes.Remove(suppliertype);
            db.SaveChanges();
            ViewBag.SuccessMsg = "You have successfully deleted Supplier Type.";
            return(View("SupplierType", db.SupplierTypes.ToList()));
        }
示例#29
0
 internal Supplier(string name, string note, SupplierType type, IDataAccessFacade dataAccessFacade)
 {
     //Calls validation on "name" for securing right input.
     validateName(name);
     this.dataAccessFacade = dataAccessFacade;
     _supplierEntity       = dataAccessFacade.CreateSupplier(name, note, type);
     //Calls party class to put supplierentity as a party.
     initializeParty(_supplierEntity);
 }
示例#30
0
 public ActionResult Add(SupplierTypeModel model)
 {
     if (ModelState.IsValid)
     {
         SupplierType supplierType = model.MapTo <SupplierTypeModel, SupplierType>();
         _supplierTypeService.Insert(supplierType);
         return(RedirectToAction("Index"));
     }
     return(View(model));
 }
示例#31
0
 public ActionResult Edit([Bind(Include = "SupplierTypeId,SupplierName,Description,Status")] SupplierType supplierType)
 {
     if (ModelState.IsValid)
     {
         db.Entry(supplierType).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(supplierType));
 }
示例#32
0
        public ActionResult EditSupplierType(int id = 0)
        {
            SupplierType Supmaster = db.SupplierTypes.Find(id);

            if (Supmaster == null)
            {
                return(HttpNotFound());
            }
            return(View(Supmaster));
        }
示例#33
0
        /// <summary>
        /// 增加客户类别
        /// </summary>
        /// <param name="pc"></param>
        /// <param name="parent"></param>
        /// <returns></returns>
        public TreeNode AddSupplierTypeNode(SupplierType pc, TreeNode parent)
        {
            TreeNode node = parent.Nodes.Add(string.Format("{0}", pc.Name));

            node.Tag = pc;
            node.SelectedImageIndex = 0;
            node.ImageIndex         = 0;
            _AllTypeNodes.Add(node);
            return(node);
        }
示例#34
0
 public static void SetSupplier(Supplier supplier, SupplierType supplierType, string code, string name, string shortName, bool isValid, string note, DateTime updateTime, int supplierCompanyId)
 {
     supplier.SupplierType = supplierType;
     supplier.Code = code;
     supplier.CnName = name;
     supplier.CnShortName = shortName;
     supplier.UpdateDate = updateTime;
     supplier.IsValid = isValid;
     supplier.Note = note;
     supplier.SupplierCompanyId = supplierCompanyId;
 }
示例#35
0
        public SupplierEntity(SupplierType type, string note, string name)
            : base(note, name)
        {
            Type = type;
            AccountNo = "";
            AccountType = AccountType.Undefined;
            AccountName = "";
            OwnerId = "";
            Bank = "";

            _paymentRules = new List<PaymentRuleEntity>();
        }
示例#36
0
        /// <summary>
        ///     创建供应商
        ///     供应商公司与供应商具有一致的编码
        /// </summary>
        /// <param name="supplierType">供应商类型</param>
        /// <param name="code">供应商编码</param>
        /// <param name="name">名称</param>
        /// <param name="note">备注</param>
        /// <returns>创建的供应商</returns>
        public static Supplier CreateSupplier(SupplierType supplierType, string code, string name, string note)
        {
            var supplier = new Supplier
            {
                SupplierType = supplierType,
                Code = code,
                CnName = name,
                CreateDate = DateTime.Now,
                UpdateDate = DateTime.Now,
                IsValid = true,
                Note = note
            };

            return supplier;
        }
 public static SupplierType CreateSupplierType(int supplierTypeId)
 {
     SupplierType supplierType = new SupplierType();
     supplierType.SupplierTypeId = supplierTypeId;
     return supplierType;
 }
 public void AddToSupplierType(SupplierType supplierType)
 {
     base.AddObject("SupplierType", supplierType);
 }
示例#39
0
    /// <summary>
    /// 
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        bool status = false;

        if (ddlRuleTypes.SelectedValue == "0") // Promotions
        {
            if (!CheckAssemblyClass(typeof(ZNodePromotionOption)))
                return;

            DiscountType entity = new DiscountType();

            if(_ItemId > 0)
               entity = _RuleTypeAdmin.GetDiscountTypeById(_ItemId);

            entity.Name = txtRuleName.Text.Trim();
            entity.ClassName = txtRuleClassName.Text.Trim();
            entity.Description = txtRuleDesc.Text.Trim();
            entity.ActiveInd = chkEnable.Checked;

            if (_ItemId > 0)
                status = _RuleTypeAdmin.UpdateDicountType(entity);
            else
                status = _RuleTypeAdmin.AddDicountType(entity);
        }
        else if (ddlRuleTypes.SelectedValue == "1") // Shipping
        {
            if (!CheckAssemblyClass(typeof(ZNodeShippingOption)))
                return;

            ShippingType shipType = new ShippingType();

            if (_ItemId > 0)
                shipType = _RuleTypeAdmin.GetShippingTypeById(_ItemId);

            shipType.Name = txtRuleName.Text.Trim();
            shipType.Description = txtRuleDesc.Text.Trim();
            shipType.ClassName = txtRuleClassName.Text.Trim();
            shipType.IsActive = chkEnable.Checked;

            if (_ItemId > 0)
                status = _RuleTypeAdmin.UpdateShippingType(shipType);
            else
                status = _RuleTypeAdmin.AddShippingType(shipType);
        }
        else if (ddlRuleTypes.SelectedValue == "2") // Taxes
        {
            if (!CheckAssemblyClass(typeof(ZNodeTaxOption)))
                return;

            TaxRuleType taxRuleType = new TaxRuleType();

            if (_ItemId > 0)
                taxRuleType = _RuleTypeAdmin.GetTaxRuleTypeById(_ItemId);

            taxRuleType.Name = txtRuleName.Text.Trim();
            taxRuleType.Description = txtRuleDesc.Text.Trim();
            taxRuleType.ClassName = txtRuleClassName.Text.Trim();
            taxRuleType.ActiveInd = chkEnable.Checked;

            if (_ItemId > 0)
                status = _RuleTypeAdmin.UpdateTaxRuleType(taxRuleType);
            else
                status = _RuleTypeAdmin.AddTaxRuleType(taxRuleType);
        }
        else if (ddlRuleTypes.SelectedValue == "3") // supplier
        {
            if (!CheckAssemblyClass(typeof(ZNodeSupplierOption)))
                return;

            SupplierType supplierType = new SupplierType();

            if (_ItemId > 0)
                supplierType = _RuleTypeAdmin.GetSupplierTypeById(_ItemId);

            supplierType.Name = txtRuleName.Text.Trim();
            supplierType.Description = txtRuleDesc.Text.Trim();
            supplierType.ClassName = txtRuleClassName.Text.Trim();
            supplierType.ActiveInd = chkEnable.Checked;

            if (_ItemId > 0)
                status = _RuleTypeAdmin.UpdateSupplierType(supplierType);
            else
                status = _RuleTypeAdmin.AddSupplierType(supplierType);
        }

        if (status)
        {
            Response.Redirect(RedirectUrl);
        }
        else
        {
            lblErrorMsg.Text = "Unable to process your request. Please try again.";
        }
    }
示例#40
0
 public ISupplier CreateSupplier(string name, string note,
     SupplierType type)
 {
     //Calls the suppliercollection class for create.
     return supplierCollection.Create(name, note, type);
 }
示例#41
0
 public ISupplier CreateSupplier(string name, string note, SupplierType type)
 {
     //Calls Create and gives it the neccessary parameters.
     return supplierMapper.Create(name, note, type);
 }