// PUT api/awbuildversion/5
        public void Put(SalesPerson value)
        {
            var GetActionType = Request.Headers.Where(x => x.Key.Equals("ActionType")).FirstOrDefault();

            if (GetActionType.Key != null)
            {
                if (GetActionType.Value.ToList()[0].Equals("DELETE"))
                    adventureWorks_BC.SalesPersonDelete(value);
                if (GetActionType.Value.ToList()[0].Equals("UPDATE"))
                    adventureWorks_BC.SalesPersonUpdate(value);
            }
        }
        public ActionResult DeleteConfirmed(int id)
        {
            SalesPerson salesPerson = db.SalesPersons.Find(id);

            try
            {
                db.SalesPersons.Remove(salesPerson);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }
            catch (Exception ex)
            {
                ViewBag.Message = "Error Encountered While Attempting to Delete - Msg: " + ex.Message;

                return(View(salesPerson));
            }
        }
        /// <summary>
        /// Gets salesPerson based on SalesPersonID.
        /// </summary>
        /// <param name="searchSalesPersonID">Represents SalesPersonID to search.</param>
        /// <returns>Returns SalesPerson object.</returns>
        public override SalesPerson GetSalesPersonBySalesPersonIDDAL(Guid searchSalesPersonID)
        {
            SalesPerson matchingSalesPerson = null;

            try
            {
                //Find SalesPerson based on searchSalesPersonID
                matchingSalesPerson = salesPersonList.Find(
                    (item) => { return(item.SalesPersonID == searchSalesPersonID); }
                    );
            }
            catch (Exception)
            {
                throw;
            }
            return(matchingSalesPerson);
        }
示例#4
0
        /// <summary>
        /// Gets salesPerson based on email.
        /// </summary>
        /// <param name="email">Represents SalesPerson's Email Address.</param>
        /// <returns>Returns SalesPerson object.</returns>
        public override SalesPerson GetSalesPersonByEmailDAL(string email)
        {
            SalesPerson matchingSalesPerson = null;

            try
            {
                //Find SalesPerson based on Email and Password
                matchingSalesPerson = salesPersonList.Find(
                    (item) => { return(item.Email.Equals(email)); }
                    );
            }
            catch (Exception)
            {
                throw;
            }
            return(matchingSalesPerson);
        }
示例#5
0
        public async Task <IActionResult> OnGetAsync(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            SalesPerson = await _context.SalesPerson
                          .Include(s => s.Department).FirstOrDefaultAsync(m => m.Id == id);

            if (SalesPerson == null)
            {
                return(NotFound());
            }
            ViewData["DepartmentId"] = new SelectList(_context.Department, "Id", "DepartmentName");
            return(Page());
        }
        static void Main(string[] args)
        {
            SalesPerson salesPerson = new SalesPerson("John", "Doe", 1500);
            Manager     manager     = new Manager("Bob", "Bobsky", 2500);

            salesPerson.AddSuccessRevenue(2000);
            double salesPersonSalary = salesPerson.GetSalary();

            // Console.WriteLine(salesPersonSalary);

            manager.AddBonus(200);
            manager.AddBonus(5000);
            double managerSalary = manager.GetSalary();

            Console.WriteLine(managerSalary);
            Console.ReadLine();
        }
示例#7
0
        /// <summary>
        /// Method Override Usage
        /// </summary>
        private void MethodOverrideUsage()
        {
            Console.WriteLine("=> Method Override Usage: ");

            Manager chucky = new Manager("Chucky", 50, 92, 100000, "333-23-2322", 9000);

            chucky.GiveBonus(300);
            chucky.DisplayStatus();
            Console.WriteLine();

            SalesPerson fran = new SalesPerson("Fran", 43, 93, 3000, "932-32-3232", 31);

            fran.GiveBonus(200);
            fran.DisplayStatus();

            Console.WriteLine();
        }
        public virtual SalesPerson MapBOToEF(
            BOSalesPerson bo)
        {
            SalesPerson efSalesPerson = new SalesPerson();

            efSalesPerson.SetProperties(
                bo.Bonus,
                bo.BusinessEntityID,
                bo.CommissionPct,
                bo.ModifiedDate,
                bo.Rowguid,
                bo.SalesLastYear,
                bo.SalesQuota,
                bo.SalesYTD,
                bo.TerritoryID);
            return(efSalesPerson);
        }
示例#9
0
        ///<summary>
        ///  Update the Typed SalesTerritoryHistory Entity with modified mock values.
        ///</summary>
        static public void UpdateMockInstance_Generated(TransactionManager tm, SalesTerritoryHistory mock)
        {
            mock.EndDate      = TestUtility.Instance.RandomDateTime();
            mock.ModifiedDate = TestUtility.Instance.RandomDateTime();

            //OneToOneRelationship
            SalesPerson mockSalesPersonBySalesPersonId = SalesPersonTest.CreateMockInstance(tm);

            DataRepository.SalesPersonProvider.Insert(tm, mockSalesPersonBySalesPersonId);
            mock.SalesPersonId = mockSalesPersonBySalesPersonId.SalesPersonId;

            //OneToOneRelationship
            SalesTerritory mockSalesTerritoryByTerritoryId = SalesTerritoryTest.CreateMockInstance(tm);

            DataRepository.SalesTerritoryProvider.Insert(tm, mockSalesTerritoryByTerritoryId);
            mock.TerritoryId = mockSalesTerritoryByTerritoryId.TerritoryId;
        }
示例#10
0
        // GET: SalesPersons/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            SalesPerson salesPerson = db.SalesPersons.Find(id);

            if (salesPerson == null)
            {
                return(HttpNotFound());
            }
            ViewBag.SalesPersonID = new SelectList(db.SalesPersons, "SalesPersonID", "SalesPersonName", salesPerson.SalesPersonID);
            ViewBag.SalesPersonID = new SelectList(db.SalesPersons, "SalesPersonID", "SalesPersonName", salesPerson.SalesPersonID);
            ViewBag.TerritoryID   = new SelectList(db.Territories, "TerritoryID", "TerritoryName", salesPerson.TerritoryID);
            return(View(salesPerson));
        }
示例#11
0
        static void Main(string[] args)
        {
            Employee bob = new Employee()
            {
                FirstName = "Bob", LastName = "Bobski", Role = Role.Sales
            };
            //bob.PrintInfo();

            SalesPerson john = new SalesPerson("John", "Doe");

            john.PrintInfo();
            Console.WriteLine(john.GetSalary());
            john.AddSuccessRevenue(4000);
            Console.WriteLine(john.GetSalary());

            Console.ReadLine();
        }
示例#12
0
        public async Task <IActionResult> OnPostAsync(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            SalesPerson = await _context.SalesPerson.FindAsync(id);

            if (SalesPerson != null)
            {
                _context.SalesPerson.Remove(SalesPerson);
                await _context.SaveChangesAsync();
            }

            return(RedirectToPage("./Index"));
        }
示例#13
0
        /// <summary>
        /// Deep Loads the <see cref="IEntity"/> object with criteria based of the child
        /// property collections only N Levels Deep based on the <see cref="DeepLoadType"/>.
        /// </summary>
        /// <remarks>
        /// Use this method with caution as it is possible to DeepLoad with Recursion and traverse an entire object graph.
        /// </remarks>
        /// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
        /// <param name="entity">The <see cref="Nettiers.AdventureWorks.Entities.SalesPersonQuotaHistory"/> object to load.</param>
        /// <param name="deep">Boolean. A flag that indicates whether to recursively save all Property Collection that are descendants of this instance. If True, saves the complete object graph below this object. If False, saves this object only. </param>
        /// <param name="deepLoadType">DeepLoadType Enumeration to Include/Exclude object property collections from Load.</param>
        /// <param name="childTypes">Nettiers.AdventureWorks.Entities.SalesPersonQuotaHistory Property Collection Type Array To Include or Exclude from Load</param>
        /// <param name="innerList">A collection of child types for easy access.</param>
        /// <exception cref="ArgumentNullException">entity or childTypes is null.</exception>
        /// <exception cref="ArgumentException">deepLoadType has invalid value.</exception>
        public override void DeepLoad(TransactionManager transactionManager, Nettiers.AdventureWorks.Entities.SalesPersonQuotaHistory entity, bool deep, DeepLoadType deepLoadType, System.Type[] childTypes, DeepSession innerList)
        {
            if (entity == null)
            {
                return;
            }

            #region SalesPersonIdSource
            if (CanDeepLoad(entity, "SalesPerson|SalesPersonIdSource", deepLoadType, innerList) &&
                entity.SalesPersonIdSource == null)
            {
                object[] pkItems = new object[1];
                pkItems[0] = entity.SalesPersonId;
                SalesPerson tmpEntity = EntityManager.LocateEntity <SalesPerson>(EntityLocator.ConstructKeyFromPkItems(typeof(SalesPerson), pkItems), DataRepository.Provider.EnableEntityTracking);
                if (tmpEntity != null)
                {
                    entity.SalesPersonIdSource = tmpEntity;
                }
                else
                {
                    entity.SalesPersonIdSource = DataRepository.SalesPersonProvider.GetBySalesPersonId(transactionManager, entity.SalesPersonId);
                }

                                #if NETTIERS_DEBUG
                System.Diagnostics.Debug.WriteLine("- property 'SalesPersonIdSource' loaded. key " + entity.EntityTrackingKey);
                                #endif

                if (deep && entity.SalesPersonIdSource != null)
                {
                    innerList.SkipChildren = true;
                    DataRepository.SalesPersonProvider.DeepLoad(transactionManager, entity.SalesPersonIdSource, deep, deepLoadType, childTypes, innerList);
                    innerList.SkipChildren = false;
                }
            }
            #endregion SalesPersonIdSource

            //used to hold DeepLoad method delegates and fire after all the local children have been loaded.
            Dictionary <string, KeyValuePair <Delegate, object> > deepHandles = new Dictionary <string, KeyValuePair <Delegate, object> >();

            //Fire all DeepLoad Items
            foreach (KeyValuePair <Delegate, object> pair in deepHandles.Values)
            {
                pair.Key.DynamicInvoke((object[])pair.Value);
            }
            deepHandles = null;
        }
        public virtual BOSalesPerson MapEFToBO(
            SalesPerson ef)
        {
            var bo = new BOSalesPerson();

            bo.SetProperties(
                ef.BusinessEntityID,
                ef.Bonus,
                ef.CommissionPct,
                ef.ModifiedDate,
                ef.Rowguid,
                ef.SalesLastYear,
                ef.SalesQuota,
                ef.SalesYTD,
                ef.TerritoryID);
            return(bo);
        }
示例#15
0
        /// <summary>
        /// Add the Employee email that has assigned the salesperson as a recipient in the Email template generated by Appointment.
        /// </summary>
        private static void AddSalespersonRecipient(AppointmentEntry graphAppointmentEntry, NotificationRecipient recSetup, RecipientList recipients)
        {
            NotificationRecipient recipient = null;

            PXResult <SalesPerson, EPEmployee, BAccount, Contact> bqlResult =
                (PXResult <SalesPerson, EPEmployee, BAccount, Contact>)
                PXSelectJoin <SalesPerson,
                              InnerJoin <EPEmployee,
                                         On <
                                             EPEmployee.salesPersonID, Equal <SalesPerson.salesPersonID> >,
                                         InnerJoin <BAccount,
                                                    On <
                                                        BAccount.bAccountID, Equal <EPEmployee.bAccountID> >,
                                                    InnerJoin <Contact,
                                                               On <
                                                                   BAccount.parentBAccountID, Equal <Contact.bAccountID>,
                                                                   And <BAccount.defContactID, Equal <Contact.contactID> > > > > >,
                              Where <
                                  SalesPerson.salesPersonID, Equal <Required <FSAppointment.salesPersonID> > > >
                .Select(graphAppointmentEntry, graphAppointmentEntry.AppointmentRecords.Current.SalesPersonID);

            Contact     contactRow     = (Contact)bqlResult;
            BAccount    baccountRow    = (BAccount)bqlResult;
            EPEmployee  epEmployeeRow  = (EPEmployee)bqlResult;
            SalesPerson SalespersonRow = (SalesPerson)bqlResult;

            if (epEmployeeRow != null && SalespersonRow != null)
            {
                if (contactRow != null && contactRow.EMail != null)
                {
                    recipient = new NotificationRecipient()
                    {
                        Active = true,
                        Email  = contactRow.EMail,
                        Hidden = recSetup.Hidden,
                        Format = recSetup.Format
                    };

                    if (recipient != null)
                    {
                        recipients.Add(recipient);
                    }
                }
            }
        }
示例#16
0
        static void Main(string[] args)
        {
            Employee    employee    = new Employee("Bob", "Bobsky", Role.Other, 600);
            SalesPerson salesPerson = new SalesPerson("Bill", "Billsky", 1500);
            Manager     manager     = new Manager("Elon", "Musk", 5000);

            salesPerson.ExtendSuccessRevenue(2000);
            manager.AddBonus(4000);
            salesPerson.ExtendSuccessRevenue(3000);

            Console.WriteLine(employee.GetInfo());
            Console.WriteLine(salesPerson.GetInfo());
            Console.WriteLine(manager.GetInfo());

            Console.WriteLine($"Employee salary: {employee.GetSalary()}");
            Console.WriteLine($"SalesPerson salary: {salesPerson.GetSalary()}");
            Console.WriteLine($"Manager salary: {manager.GetSalary()}");
        }
示例#17
0
        public async Task <IActionResult> OnGetAsync(string id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            Order = await _orders.GetAsync(id);

            if (Order == null)
            {
                return(NotFound());
            }

            Seller = await _users.FindByNameAsync(Order.SellerId);

            return(Page());
        }
示例#18
0
        static void Main(string[] args)
        {
            Manager manager = new Manager("Ivana", "Stefanovska");

            manager.PrintInfo();
            manager.AddBonus(3000);
            Console.WriteLine("Salary: {0}", manager.GetSalary());
            Console.WriteLine("------------------------------------");

            SalesPerson sales01 = new SalesPerson("Random1", "Random2");

            sales01.PrintInfo();
            sales01.AddSuccessSaleRevenue(1500);
            Console.WriteLine("Salary: {0}", sales01.GetSalary());


            Console.ReadLine();
        }
示例#19
0
        private async Task <bool> ChangeEmailAsync(SalesPerson oldModel, SalesPerson newModel)
        {
            if (!String.IsNullOrEmpty(newModel.EMail))
            {
                if (!newModel.EMail.Equals(oldModel.EMail))
                {
                    var result = await _accountManager.ChangeEmailAsync(oldModel.EMail, newModel.EMail, this.Request, this.Url);

                    if (!result.Succeeded)
                    {
                        _accountManager.AddModelStateErrors(this.ModelState, result);
                        return(false);
                    }
                }
            }

            return(true);
        }
 /*
  * Method name: DetermineCommissionAndRate()
  * Version:   1.1.1
  #Description:  This method determine commission and based on rate
  * Inputs:   Parameters- aSalesPerson
  * Outputs: N/A
  * Return value: N/A
  * Change History:   20190930 By Md Ahsanul Hoque
  */
 public static void DetermineCommissionAndRate(SalesPerson aSalesPerson)
 {
     if (aSalesPerson.InsuranceAmount < 1000 && aSalesPerson.InsuranceAmount >= 0)
     {
         CalcCommissionEarned(SalesPerson.RATE_1, aSalesPerson);
         aSalesPerson.Rate = SalesPerson.RATE_1;
     }
     else if (aSalesPerson.InsuranceAmount >= 1000 && aSalesPerson.InsuranceAmount < 100000)
     {
         CalcCommissionEarned(SalesPerson.RATE_2, aSalesPerson);
         aSalesPerson.Rate = SalesPerson.RATE_2;
     }
     else
     {
         CalcCommissionEarned(SalesPerson.RATE_3, aSalesPerson);
         aSalesPerson.Rate = SalesPerson.RATE_3;
     }
 }
示例#21
0
        public bool Update(SalesPerson updatedSalesPerson)
        {
            bool salesPersonExists = this.SalesPeople
                                     .Any(salesPerson => updatedSalesPerson.Equals(salesPerson));

            if (!salesPersonExists)
            {
                return(false);
            }

            this.SalesPeople = this.SalesPeople.Select(existingSalesPerson =>
                                                       updatedSalesPerson.Equals(existingSalesPerson)
        ? updatedSalesPerson
        : existingSalesPerson
                                                       ).ToArray();

            return(true);
        }
        static void Main(string[] args)
        {
            Employee theEmployee = new Employee("Poppy", "Willson", Role.Other, 400);

            theEmployee.PrintInfo();

            SalesPerson salesEmployee = new SalesPerson("John", "Doe", 500);

            salesEmployee.AddSuccessRevenue(2000);
            salesEmployee.PrintInfo();

            Manager managerEmployee = new Manager("Emily", "Johnson", 2000);

            managerEmployee.AddBonus(500);
            managerEmployee.PrintInfo();

            Console.ReadLine();
        }
示例#23
0
        static void Main(string[] args)
        {
            Manager manager = new Manager("Bob", "Bobsky");

            manager.PrintInfo();
            manager.AddBonus(3000);
            Console.WriteLine("Salary: {0}", manager.GetSalary());
            Console.WriteLine("------------------------------------");

            SalesPerson sales01 = new SalesPerson("John", "Snow");

            sales01.PrintInfo();
            sales01.ExtendSuccessSaleRevenue(1500);
            Console.WriteLine("Salary: {0}", sales01.GetSalary());


            Console.ReadLine();
        }
示例#24
0
        /// <summary>
        /// Adds new salesPerson to SalesPersons collection.
        /// </summary>
        /// <param name="newSalesPerson">Contains the salesPerson details to be added.</param>
        /// <returns>Determinates whether the new salesPerson is added.</returns>
        public override bool AddSalesPersonDAL(SalesPerson newSalesPerson)
        {
            bool salesPersonAdded = false;

            try
            {
                newSalesPerson.SalesPersonID        = Guid.NewGuid();
                newSalesPerson.CreationDateTime     = DateTime.Now;
                newSalesPerson.LastModifiedDateTime = DateTime.Now;
                salesPersonList.Add(newSalesPerson);
                salesPersonAdded = true;
            }
            catch (Exception)
            {
                throw;
            }
            return(salesPersonAdded);
        }
示例#25
0
        static void Main(string[] args)
        {
            Employee emp = new Employee("Bob", "Bobsky");

            emp.Role = Role.Other;
            SalesPerson sale = new SalesPerson("Bill", "Billsky");

            emp.GetSalary(666);
            Manager manager = new Manager("Marija", "Prosheva", 300);

            sale.AddSuccessRevenue(2000);
            Console.WriteLine(emp.PrintInfo());
            Console.WriteLine(sale.PrintInfo());
            Console.WriteLine("Employee Salary: " + emp.GetSalary(666));
            Console.WriteLine("Sales Person Salary: " + sale.GetSalary(666));
            Console.WriteLine("Manager Salary :" + manager.GetSalary(444));
            Console.ReadLine();
        }
示例#26
0
        public IActionResult OnGet(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            SalesPerson = _context.SalesPerson.Find(id);

            if (SalesPerson == null)
            {
                return(NotFound());
            }

            FireSPForm = new FireSPForm();
            FireSPForm.SalesPersonId = SalesPerson.Id;
            return(Page());
        }
示例#27
0
        /// <summary>
        /// Updates a mock SalesPerson entity into the database.
        /// </summary>
        private void Step_04_Update_Generated()
        {
            using (TransactionManager tm = CreateTransaction())
            {
                SalesPerson mock = CreateMockInstance(tm);
                Assert.IsTrue(DataRepository.SalesPersonProvider.Insert(tm, mock), "Insert failed");

                UpdateMockInstance(tm, mock);
                Assert.IsTrue(DataRepository.SalesPersonProvider.Update(tm, mock), "Update failed.");

                System.Console.WriteLine("DataRepository.SalesPersonProvider.Update(mock):");
                System.Console.WriteLine(mock);

                //normally one would commit here
                //tm.Commit();
                //IDisposable will Rollback Transaction since it's left uncommitted
            }
        }
示例#28
0
 //登录
 private void btnLog_Click(object sender, EventArgs e)
 {
     //登录文本验证如果等于零则有未填项
     if (txtLogid.CheckData(@"^[1-9]\d*$", "账号格式为纯数字!") * txtLogpwd.CheckNullOrEmpty() == 1)
     {
         //登录账号和密码封装
         SalesPerson person = new SalesPerson()
         {
             SalesPersonId = int.Parse(txtLogid.Text),
             LoginPwd      = txtLogpwd.Text.Trim()
         };
         //实例化一个管理员的类来记录登录的信息
         SalesPerson res = manager.SalesLogin(person);
         //如果不为空则登录成功
         if (res != null)
         {
             //同时记录在全局中
             Program.Sales = res;
             //写入系统日志之中
             try
             {
                 int logId = manager.WriteSalesLog(new LoginLogs()
                 {
                     LoginId    = res.SalesPersonId,
                     ServerName = Dns.GetHostName(),
                     SPName     = res.SPName
                 });
                 Program.Sales.LogId = logId;
                 logHelper.WriteInfo(string.Format("管理员登录ID{0},登录服务器名称{1},登陆者姓名{2}", res.LogId, Dns.GetHostName(), res.SPName));
                 this.DialogResult = DialogResult.OK;
                 this.Close();
             }
             catch (Exception ex)
             {
                 logHelper.WriteError(ex.Message);
                 return;
             }
         }
         else
         {
             MessageBox.Show("信息有误请重新登录!", "登录提示!");
         }
     }
 }
示例#29
0
        static void Main(string[] args)
        {
            Employee emp = new Employee()
            {
                FirstName = "Bob", LastName = "Bobsky", Salary = 600, Role = Role.Other
            };
            SalesPerson sale = new SalesPerson("Bill", "Billsky", 1500);
            Manager     mng  = new Manager("Ron", "Ronsky", 1500);

            sale.ExtendSuccessSaleRevenue(2000);
            mng.AddBonus(400);
            emp.PrintInfo();
            sale.PrintInfo();
            mng.PrintInfo();
            Console.WriteLine("Employee Salary: " + emp.GetSalary());
            Console.WriteLine("Sales Person Salary: " + sale.GetSalary());
            Console.WriteLine("Manager Salary: " + mng.GetSalary());
            Console.ReadLine();
        }
        public ActionResult DeleteConfirmed(int id)
        {
            var res = (from c in db.SalesPersons
                       where c.BusinessEntityID == id
                       select c).FirstOrDefault();

            if (res != null)
            {
                res.isDeleted = true;
                db.SaveChanges();
                ViewBag.Message = string.Format("Congrats! Delete success");
            }

            SalesPerson salesPerson = db.SalesPersons.Find(id);



            return(View(salesPerson));
        }
        private SalesPerson ReadDataFromResponseStream()
        {
            // TODO: 06: Create an HttpWebResponse object.
            var response = this._request.GetResponse() as HttpWebResponse;

            // TODO: 07: Check to see if the response contains any data.
            if (response.ContentLength == 0)
            {
                return(null);
            }

            // TODO: 08: Read and process the response data.
            var stream = new StreamReader(response.GetResponseStream());
            var result = SalesPerson.FromJson(stream.BaseStream);

            stream.Close();

            return(result);
        }
 /// <summary>
 /// Create a new SalesPerson object.
 /// </summary>
 /// <param name="salesPersonID">Initial value of SalesPersonID.</param>
 /// <param name="bonus">Initial value of Bonus.</param>
 /// <param name="commissionPct">Initial value of CommissionPct.</param>
 /// <param name="salesYTD">Initial value of SalesYTD.</param>
 /// <param name="salesLastYear">Initial value of SalesLastYear.</param>
 /// <param name="rowguid">Initial value of rowguid.</param>
 /// <param name="modifiedDate">Initial value of ModifiedDate.</param>
 public static SalesPerson CreateSalesPerson(int salesPersonID, decimal bonus, decimal commissionPct, decimal salesYTD, decimal salesLastYear, global::System.Guid rowguid, global::System.DateTime modifiedDate)
 {
     SalesPerson salesPerson = new SalesPerson();
     salesPerson.SalesPersonID = salesPersonID;
     salesPerson.Bonus = bonus;
     salesPerson.CommissionPct = commissionPct;
     salesPerson.SalesYTD = salesYTD;
     salesPerson.SalesLastYear = salesLastYear;
     salesPerson.rowguid = rowguid;
     salesPerson.ModifiedDate = modifiedDate;
     return salesPerson;
 }
 /// <summary>
 /// Create a new SalesPerson object.
 /// </summary>
 /// <param name="id">Initial value of ID.</param>
 /// <param name="firstName">Initial value of FirstName.</param>
 /// <param name="lastName">Initial value of LastName.</param>
 public static SalesPerson CreateSalesPerson(int id, string firstName, string lastName)
 {
     SalesPerson salesPerson = new SalesPerson();
     salesPerson.ID = id;
     salesPerson.FirstName = firstName;
     salesPerson.LastName = lastName;
     return salesPerson;
 }
示例#34
0
 public Trade(SalesPerson person, int quantitySold)
 {
     Person = person;
     QuantitySold = quantitySold;
 }
 /// <summary>
 /// There are no comments for SalesPerson in the schema.
 /// </summary>
 public void AddToSalesPerson(SalesPerson salesPerson)
 {
     base.AddObject("SalesPerson", salesPerson);
 }
 // POST api/awbuildversion
 public void Post(SalesPerson value)
 {
     adventureWorks_BC.SalesPersonAdd(value);
 }