• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# BusinessObjects类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中BusinessObjects的典型用法代码示例。如果您正苦于以下问题:C# BusinessObjects类的具体用法?C# BusinessObjects怎么用?C# BusinessObjects使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



BusinessObjects类属于命名空间,在下文中一共展示了BusinessObjects类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: EditOrCreate

        public ActionResult EditOrCreate(BusinessObjects.WorkManagement.Customer newInstance)
        {
            string userID = "SYSTEM";

            try
            {
                bool hasLocationContentChanged = false;

                if (newInstance.BillingAddress != null && newInstance.BillingAddress.ID > 0)
                {
                    string serialized = (Server.HtmlDecode(Request["originalModel"]));

                    /*
                    // Test that Request["originalModel"] is actually a serialized Location instance 
                    System.Xml.XmlDocument xml = new System.Xml.XmlDocument();
                    xml.LoadXml(serialized);
                    BusinessObjects.WorkManagement.Location originalContent = null;
                    originalContent = (BusinessObjects.WorkManagement.Location)BusinessObjects.Base.Deserialize(typeof(BusinessObjects.WorkManagement.Location),xml);
                    */

                    hasLocationContentChanged = (serialized != newInstance.BillingAddress.Serialize());
                }

                newInstance.HasLocationChanged = hasLocationContentChanged;
                _modelContext.SaveCustomer(newInstance, userID);

                return RedirectToAction("Index");
            }
            catch
            {
                return View();
            }
        }
开发者ID:bedford603067,项目名称:Augment,代码行数:33,代码来源:CustomersController.cs


示例2: Create

 public int Create(BusinessObjects.User User,int isdirect=1)
 {
     int retVal = -1;
     SqlParameter sqlparm = new SqlParameter();
     sqlparm.ParameterName = "@EffectiveUserId";
     sqlparm.Direction = ParameterDirection.Output;
     sqlparm.DbType = DbType.Int32;
     List<string> outParmNames = new List<string>();
     List<SqlParameter> param = new List<SqlParameter>();
     outParmNames.Add(sqlparm.ParameterName);
     Dictionary<string, Object> dic = new Dictionary<string, Object>();
     param.Add(new SqlParameter("@UserName", User.UserLogin.UserName));
     param.Add(new SqlParameter("@Password", User.UserLogin.Password));
     param.Add(new SqlParameter("@EmailId", User.UserLogin.EmailID));
     param.Add(new SqlParameter("@AuthType", User.UserLogin.AuthType.Auth_Id));
     param.Add(sqlparm);
     dic = Execute("SP_UserLogin_Create", param.ToArray(), outParmNames);
     retVal = (int)dic[sqlparm.ParameterName];
     User.PK_User_Id = retVal;
     if (isdirect==1)
     {
         CreateUserProfile(User);
     }
     return retVal;
 }
开发者ID:bhrugu4me,项目名称:MyFan,代码行数:25,代码来源:User.cs


示例3: HandleAlarms

 protected static void HandleAlarms(string source, ref BusinessObjects.Recipe recipe)
 {
     recipe.Alarms = new List<BusinessObjects.Alarm>();
     var alarmMinEx = new Regex(".(?<text>(\\w+\\s)+)(?<minutos>\\d+)\\sminutos");
     if (alarmMinEx.IsMatch(source))
     {
         foreach (Match match in alarmMinEx.Matches(source))
         {
             var alarm = new BusinessObjects.Alarm
             {
                 Minutes = double.Parse(match.Groups["minutos"].Value),
                 Name = match.Groups["text"].Value
             };
             recipe.Alarms.Add(alarm);
         }
     }
     var alarmHourEx = new Regex(".(?<text>(\\w+\\s)+)(?<hora>\\d+)\\shora(s*)");
     if (alarmHourEx.IsMatch(source))
     {
         foreach (Match match in alarmHourEx.Matches(source))
         {
             var alarm = new BusinessObjects.Alarm
             {
                 Minutes = double.Parse(match.Groups["hora"].Value) * 60,
                 Name = match.Groups["text"].Value
             };
             recipe.Alarms.Add(alarm);
         }
     }
 }
开发者ID:pachif,项目名称:RecipeHub,代码行数:30,代码来源:ProviderBase.cs


示例4: TranslateRecipeMicrosoft

        public void TranslateRecipeMicrosoft(BusinessObjects.Recipe recipe)
        {
            CultureInfo currentCulture = System.Threading.Thread.CurrentThread.CurrentCulture;
            if (!currentCulture.TwoLetterISOLanguageName.ToLowerInvariant().Equals("es"))
            {
                if (traslator == null)
                {
                    traslator = new MicrosoftTransProvider(KEY, SECRET);
                }
                string target = currentCulture.TwoLetterISOLanguageName;

                recipe.Title = traslator.Translate(HttpUtility.HtmlDecode(recipe.Title), target);
                recipe.MainIngredient = traslator.Translate(recipe.MainIngredient, target);
                recipe.Category = traslator.Translate(recipe.Category, target);

                if (!string.IsNullOrEmpty(recipe.Procedure))
                {
                    string procedure = recipe.Procedure.Replace("\r\n\r\n", " [n] ").Replace("\n                    ", " [n] ");
                    procedure = traslator.Translate(procedure, target);
                    procedure = HttpUtility.HtmlDecode(procedure);
                    recipe.Procedure = procedure.Replace("[n] ", "\n").Replace("[N] ", "\n").Replace("[ n] ", "\n").Replace("[n ] ", "\n");
                }

                if (recipe.Ingridients != null && recipe.Ingridients.Count > 0)
                {
                    recipe.Ingridients = TranslateList(traslator, recipe.Ingridients, target);
                }

                if (recipe.Alarms != null && recipe.Alarms.Count > 0)
                {
                    var list = new List<string>();
                    recipe.Alarms.ForEach(al => al.Name = traslator.Translate(al.Name, target));
                }
            }
        }
开发者ID:pachif,项目名称:RecipeHub,代码行数:35,代码来源:ProviderBase.cs


示例5: Add

        public void Add(BusinessObjects.GroupRelation entity)
        {
            //Add GroupRelation
            using (_GroupRelationRepository = new GenericRepository<DAL.DataEntities.GroupRelation>())
            {
                _GroupRelationRepository.Add((DAL.DataEntities.GroupRelation)entity.InnerEntity);
                _GroupRelationRepository.SaveChanges();
            }

            //Add GroupRelations_To_Features
            using (_GroupRelationsToFeaturesRepository = new GenericRepository<DAL.DataEntities.GroupRelation_To_Feature>())
            {

                foreach (int childFeatureID in entity.ChildFeatureIDs)
                {
                    DAL.DataEntities.GroupRelation_To_Feature grToFeature = new DAL.DataEntities.GroupRelation_To_Feature();
                    grToFeature.GroupRelationID = entity.ID;
                    grToFeature.ParentFeatureID = entity.ParentFeatureID;
                    grToFeature.ChildFeatureID = childFeatureID;

                    _GroupRelationsToFeaturesRepository.Add(grToFeature);
                }

                _GroupRelationsToFeaturesRepository.SaveChanges();
            }
        }
开发者ID:dswingle,项目名称:openconfigurator,代码行数:26,代码来源:GroupRelationService.cs


示例6: CreateUserProfile

        public long CreateUserProfile(BusinessObjects.User User)
        {
            long flg = 0;
            List<SqlParameter> param1 = new List<SqlParameter>();
            Dictionary<string, Object> dic1 = new Dictionary<string, Object>();
            param1.Add(new SqlParameter("@PK_User_Id", User.PK_User_Id));
            param1.Add(new SqlParameter("@FK_Utype_Id", User.UserType.PK_UserType_Id));
            param1.Add(new SqlParameter("@LastName", User.LastName));
            param1.Add(new SqlParameter("@FirstName", User.FirstName));
            param1.Add(new SqlParameter("@BirthDate", User.Birthdate));
            param1.Add(new SqlParameter("@Age", User.Age));
            param1.Add(new SqlParameter("@Gender", User.Gender));
            param1.Add(new SqlParameter("@UserEmpType", User.UserEmpType));
            param1.Add(new SqlParameter("@Education", User.Education));
            param1.Add(new SqlParameter("@Occupation", User.Occupation));
            param1.Add(new SqlParameter("@MaritalStatus", User.MaritalStatus));
            param1.Add(new SqlParameter("@City", User.City));
            param1.Add(new SqlParameter("@State", User.State));
            param1.Add(new SqlParameter("@Country", User.Country));
            param1.Add(new SqlParameter("@Area", User.Area));
            param1.Add(new SqlParameter("@IsOther", User.IsOther));
            param1.Add(new SqlParameter("@OtherLocation", User.OtherLocation));
            param1.Add(new SqlParameter("@ZipCode", User.ZipCode));
            param1.Add(new SqlParameter("@Mobile1", User.Mobile1));
            param1.Add(new SqlParameter("@Mobile2", User.Mobile2));
            param1.Add(new SqlParameter("@Fax", User.Fax));
            param1.Add(new SqlParameter("@IsVerified", User.IsVerified));
            param1.Add(new SqlParameter("@RequestorId", User.Updated_By));

            flg = Execute("SP_User_Create", param1.ToArray());
            return flg;
        }
开发者ID:bhrugu4me,项目名称:MyFan,代码行数:32,代码来源:User.cs


示例7: UpdateEmployee

        public void UpdateEmployee(BusinessObjects.Employee e)
        {
            var updatedEmployee = 
                employeeAdapter.UpdateEmployeePerson(e.JobTitle, e.BusinessEntityId, e.FirstName, e.MiddleName, e.LastName);

            throw new NotImplementedException();
        }
开发者ID:MatthewMcGowan,项目名称:AdventureWorks.Api,代码行数:7,代码来源:EmployeeDA.cs


示例8: Add

        public void Add(BusinessObjects.FeatureSelection entity)
        {
            using (_FeatureSelectionRepository = new GenericRepository<DAL.DataEntities.FeatureSelection>())
            {
                //Add the FeatureSelection
                _FeatureSelectionRepository.Add((DAL.DataEntities.FeatureSelection)entity.InnerEntity);
                _FeatureSelectionRepository.SaveChanges();

                //Add AttributeValues
                using (_AttributeValuesRepository = new GenericRepository<DAL.DataEntities.AttributeValue>())
                {
                    for (int i = entity.AttributeValues.Count - 1; i >= 0; i--)
                    {
                        BLL.BusinessObjects.AttributeValue BLLAttributeValue = entity.AttributeValues[i];
                        BLLAttributeValue.FeatureSelectionID = entity.ID;

                        //Add
                        if (BLLAttributeValue.ToBeDeleted == false && BLLAttributeValue.ID == 0)
                        {
                            _AttributeValuesRepository.Add((DAL.DataEntities.AttributeValue)BLLAttributeValue.InnerEntity);
                        }
                    }
                    _AttributeValuesRepository.SaveChanges();
                }
            }
        }
开发者ID:dswingle,项目名称:openconfigurator,代码行数:26,代码来源:FeatureSelectionService.cs


示例9: GetSeriesCatalogInRectangle

        public SearchResult GetSeriesCatalogInRectangle(Box extentBox, string[] keywords, double tileWidth, double tileHeight,
            DateTime startDate, DateTime endDate, WebServiceNode[] serviceIDs, BusinessObjects.Models.IProgressHandler bgWorker)
        {
            if (extentBox == null) throw new ArgumentNullException("extentBox");
            if (serviceIDs == null) throw new ArgumentNullException("serviceIDs");
            if (bgWorker == null) throw new ArgumentNullException("bgWorker");

            if (keywords == null || keywords.Length == 0)
            {
                keywords = new[] { String.Empty };
            }

            bgWorker.CheckForCancel();
            var extent = new Extent(extentBox.XMin, extentBox.YMin, extentBox.XMax, extentBox.YMax);
            var fullSeriesList = GetSeriesListForExtent(extent, keywords, tileWidth, tileHeight, startDate, endDate,
                                                        serviceIDs, bgWorker, series => true);
            SearchResult resultFs = null;
            if (fullSeriesList.Count > 0)
            {
                bgWorker.ReportMessage("Calculating Points...");
                resultFs = SearchHelper.ToFeatureSetsByDataSource(fullSeriesList);
            }

            bgWorker.CheckForCancel();
            var message = string.Format("{0} Series found.", totalSeriesCount);
            bgWorker.ReportProgress(100, "Search Finished. " + message);
            return resultFs;
        }
开发者ID:CUAHSI,项目名称:HydroClient,代码行数:28,代码来源:Seriessearcher.cs


示例10: ValidateCompare

 public ValidateCompare(BusinessObjects.BusinessObject otherObject,
     ValidationOperator @operator, String errorMessage)
 {
     OtherObject = otherObject;
     Operator = @operator;
     ErrorMessage = errorMessage;
 }
开发者ID:leloulight,项目名称:gemfirexd-oss,代码行数:7,代码来源:ValidateCompare.cs


示例11: Add

 public void Add(BusinessObjects.Relation entity)
 {
     using (_RelationRepository = new GenericRepository<DAL.DataEntities.Relation>())
     {
         _RelationRepository.Add((DAL.DataEntities.Relation)entity.InnerEntity);
         _RelationRepository.SaveChanges();
     }
 }
开发者ID:dswingle,项目名称:openconfigurator,代码行数:8,代码来源:RelationService.cs


示例12: Add

 public void Add(BusinessObjects.Constraint entity)
 {
     using (_ConstraintRepository = new GenericRepository<DAL.DataEntities.Constraint>())
     {
         _ConstraintRepository.Add((DAL.DataEntities.Constraint)entity.InnerEntity);
         _ConstraintRepository.SaveChanges();
     }
 }
开发者ID:dswingle,项目名称:openconfigurator,代码行数:8,代码来源:ConstraintService.cs


示例13: Add

 public void Add(BusinessObjects.Model entity)
 {
     using (_ModelRepository = new GenericRepository<DAL.DataEntities.Model>())
     {
         _ModelRepository.Add((DAL.DataEntities.Model)entity.InnerEntity);
         _ModelRepository.SaveChanges();
     }
 }
开发者ID:dswingle,项目名称:openconfigurator,代码行数:8,代码来源:ModelService.cs


示例14: Add

 public void Add(BusinessObjects.CustomRule entity)
 {
     using (_CustomRuleRepository = new GenericRepository<DAL.DataEntities.CustomRule>())
     {
         _CustomRuleRepository.Add((DAL.DataEntities.CustomRule)entity.InnerEntity);
         _CustomRuleRepository.SaveChanges();
     }
 }
开发者ID:dswingle,项目名称:openconfigurator,代码行数:8,代码来源:CustomRuleService.cs


示例15: UpdateTasks

        public BusinessObjects.WorkManagement.Job UpdateTasks(BusinessObjects.WorkManagement.Job targetJob, BusinessObjects.WorkManagement.EngineerFeedback feedback)
        {
            // Tasks
            ActivityTaskCollection activityTaskCollection = new ActivityTaskCollection();
            ActivityTask activityTask = null;

            /*
            foreach (TaskUpdate taskUpdate in feedback.Tasks)
            {
                if (targetJob.Tasks != null && targetJob.Tasks.Count > 0 && targetJob.Tasks.Find("ID", taskUpdate.ID) >= 0)
                {
                    // Update to existing Task
                    activityTask = targetJob.Tasks.Find(taskUpdate.ID);
                }
                else
                {
                    // Adding a new Task
                    activityTask = new ActivityTask();
                    activityTask.Description = taskUpdate.Comments[0].Text;
                }
                activityTask.IsComplete = taskUpdate.IsComplete;
                activityTask.IsDatabaseComplete = activityTask.IsComplete;
                activityTask.LastUpdatedDate = feedback.EndDateTime != null ? feedback.EndDateTime.Value : this.EndDateTime.Value;
                activityTaskCollection.Add(activityTask);
            }
            foreach (ActivityTask updatedActivityTask in activityTaskCollection)
            {
                if (updatedActivityTask.ID > 0)
                {
                    targetJob.Tasks.Replace(targetJob.Tasks.Find(updatedActivityTask.ID), updatedActivityTask);
                }
                else
                {
                    targetJob.Tasks.Add(updatedActivityTask);
                }
            }
            */

            foreach (TaskUpdate taskUpdate in feedback.Tasks)
            {
                activityTask = new ActivityTask();
                if (taskUpdate.ID <= 0)
                {
                    activityTask.Description = taskUpdate.Comments[0].Text;
                }
                activityTask.IsComplete = taskUpdate.IsComplete;
                activityTask.IsDatabaseComplete = activityTask.IsComplete;
                activityTask.LastUpdatedDate = feedback.EndDateTime != null ? feedback.EndDateTime.Value : this.EndDateTime.Value;

                activityTask.MaterialsRequired = taskUpdate.MaterialsUsed;
                activityTask.MeasurementsRequired = taskUpdate.MeasurementsTaken;
                
                activityTaskCollection.Add(activityTask);
            }
            targetJob.Tasks = activityTaskCollection;

            return targetJob;
        }
开发者ID:bedford603067,项目名称:Augment,代码行数:58,代码来源:JobUpdate.cs


示例16: Insert

        public void Insert(BusinessObjects.Product entity)
        {
            // Get the highest Id for the Products and increment it,
            // then assign it to the new entity before adding to the repository.
            var maxId = _products.Select(c => c.Id).Max();
            entity.Id = maxId + 1;

            _products.Add(entity);
        }
开发者ID:BorisMomtchev,项目名称:kendo-webapi-crossdomain,代码行数:9,代码来源:ProductRepository.cs


示例17: Add

 public void Add(BusinessObjects.Feature entity)
 {
     using (_FeatureRepository = new GenericRepository<DAL.DataEntities.Feature>())
     {
         //Add the Feature
         _FeatureRepository.Add((DAL.DataEntities.Feature)entity.InnerEntity);
         _FeatureRepository.SaveChanges();
     }
 }
开发者ID:dswingle,项目名称:openconfigurator,代码行数:9,代码来源:FeatureService.cs


示例18: To_DAO

        public static DataAccessLayer.Category To_DAO(BusinessObjects.Category categoryBO)
        {
            DataAccessLayer.Category categoryDAO = new DataAccessLayer.Category();

            categoryDAO.ID = categoryBO.ID;
            categoryDAO.Name = categoryBO.Name;

            return categoryDAO;
        }
开发者ID:GeorgianaPuiu,项目名称:LearnAngularJS,代码行数:9,代码来源:CategoryMapper.cs


示例19: UpdateEmployee

        public void UpdateEmployee(BusinessObjects.Employee employee)
        {
            // Paramaterised SQL query, update both tables
            string query = "UPDATE HumanResources.Employee SET JobTitle = @JobTitle WHERE BusinessEntityID = @BusinessEntityID; "
                + "UPDATE Person.Person SET FirstName = @FirstName, MiddleName = @MiddleName, LastName = @LastName WHERE BusinessEntityID = @BusinessEntityID";

            // Send SQL to DB
            int rowsAffected = cnn.Execute(query, employee.MapToParams());
        }
开发者ID:MatthewMcGowan,项目名称:AdventureWorks.Api,代码行数:9,代码来源:EmployeeDA.cs


示例20: DeletePhoneNumber

        public void DeletePhoneNumber(BusinessObjects.PersonPhone phoneNumber)
        {
            // SQL query deleting row from Person.PersonPhone
            string query = "DELETE FROM Person.PersonPhone "
                + "WHERE BusinessEntityID = @BusinessEntityID AND PhoneNumber = @PhoneNumber AND PhoneNumberTypeID = @PhoneNumberTypeID";

            // Execute query
            cnn.Execute(query, phoneNumber.MapToParams());
        }
开发者ID:MatthewMcGowan,项目名称:AdventureWorks.Api,代码行数:9,代码来源:PersonPhoneDA.cs



注:本文中的BusinessObjects类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Button类代码示例发布时间:2022-05-24
下一篇:
C# BusinessObjectParameters类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap