当前位置: 首页>>代码示例>>C#>>正文


C# Models.Save方法代码示例

本文整理汇总了C#中Models.Save方法的典型用法代码示例。如果您正苦于以下问题:C# Models.Save方法的具体用法?C# Models.Save怎么用?C# Models.Save使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Models的用法示例。


在下文中一共展示了Models.Save方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: editbugReports

 public bool editbugReports(Models.GridModel g)
 {
     if (g.Save(g, g.getXmlPath()))
          return true;
      else
          return false;
 }
开发者ID:mukund24,项目名称:Project-Center,代码行数:7,代码来源:ProjectCenter.svc.cs

示例2: Create

 public ActionResult Create(Models.ProjectModel P,Models.Project Pr)
 {
     Pr.Start_Date = DateTime.Today;
     Pr.ProjectStatusID = 1;
     P.Save(Pr);
     return RedirectToAction("List");
 }
开发者ID:mukund24,项目名称:Project-Center,代码行数:7,代码来源:ProjectsController.cs

示例3: Delete

        public ActionResult Delete(string id, Models.GridModel model)
        {
            // We got here from an ActionLink, so no data is posted,
            // but we do get the link's id.

            int selected = Int32.Parse(id);
            model.Bugs.RemoveAt(selected);
            model.Save(model, model.getXmlPath());
            return RedirectToAction("List");
        }
开发者ID:mukund24,项目名称:Project-Center,代码行数:10,代码来源:BugReportsController.cs

示例4: Create

        public ActionResult Create(Models.WorkPackageDescription wpd,Models.WorkPackageModel w)
        {
            wpd.Wp_Date = DateTime.Today;
               if( w.Save(wpd))
            return RedirectToAction("List");

               else
               {
               Session["ErrorMessage"] = "Failed To Submit Changes";
               return RedirectToAction("ErrorPage", "Home");
               }
        }
开发者ID:mukund24,项目名称:Project-Center,代码行数:12,代码来源:WorkPackageController.cs

示例5: Create

 public ActionResult Create( Models.StatusReportModel S,Models.StatusReport sr)
 {
     if (S.Save(sr))
     {
         return RedirectToAction("Status");
     }
     else
     {
         Session["ErrorMessage"] = "Failed To Submit Changes";
         return RedirectToAction("ErrorPage", "Home");
     }
 }
开发者ID:mukund24,项目名称:Project-Center,代码行数:12,代码来源:StatusReportsController.cs

示例6: Create

 public ActionResult Create(Models.SoftwareReqtsModel S, Models.Software_Requirement sr)
 {
     sr.Sr_Date = DateTime.Now;
     if (S.Save(sr))
     {
         return RedirectToAction("List");
     }
     else
     {
         Session["ErrorMessage"] = "Failed To Submit Changes";
         return RedirectToAction("ErrorPage", "Home" );
     }
 }
开发者ID:mukund24,项目名称:Project-Center,代码行数:13,代码来源:Software_ReqtsController.cs

示例7: Insert

 public ActionResult Insert(Models.BugReport cmodel, Models.GridModel model)
 {
     // We got here from a submit button on the Insert form, one of two
     // in the Show.aspx view.  Therefore, model data was sent to us
     // via the cmodel parameter, but we don't get an id.
     int cnt = Int32.Parse(model.count);
     cnt++;
     cmodel.Id = cnt.ToString();
     model.count = cnt.ToString();
     model.Bugs.Add(cmodel);
     cmodel.DateAdded = DateTime.Today.ToShortDateString();
     model.Save(model, model.getXmlPath());
     return RedirectToAction("List");
 }
开发者ID:mukund24,项目名称:Project-Center,代码行数:14,代码来源:BugReportsController.cs

示例8: Post

        public Models.User Post(Models.UserModel value)
        {
            if (value.Oid > 0) // edit
            {
                if (!Validators.Validator.IsValid(value, "Password", "ConfirmPassword"))
                    throw new ArgumentException();

                var user = value.Save();
                if (user != null)
                    user.PasswordHash = String.Empty;
                return user;
            }
            else
            {
                if (!Validators.Validator.IsValid(value)) // need to pass in properties to ignore...
                    throw new ArgumentException();

                return Models.User.CreateUser(value.Username, value.EmailAddress, value.Password, value.UserRole, value.Administrator);
            }
        }
开发者ID:JonnyCam,项目名称:NextPvrWebConsole,代码行数:20,代码来源:UsersController.cs

示例9: SchedulesDirect

 public bool SchedulesDirect(Models.SchedulesDirectModel Model)
 {
     return Model.Save();
 }
开发者ID:revenz,项目名称:NextPvrWebConsole,代码行数:4,代码来源:ConfigurationController.cs

示例10: Save

        public ActionResult Save(Models.BugReport cmodel, Models.GridModel model)
        {
            // We get here when a "Save" submit button is clicked, so an Http Post
            // message was used.  Thus, we get model data sent up via the cmodel
            // parameter, however we can't get an id number.  That comes only with
            // the actionlinks.

            // Therefore we used a Session["selected"] value to transfer
            // this one datum from the view to this controller method.

            int selected = (int)Session["selected"];

            model.Bugs[selected].EmpId = cmodel.EmpId;
            model.Bugs[selected].Title = cmodel.Title;
            model.Bugs[selected].Requirement = cmodel.Requirement;
            model.Bugs[selected].ProjectName = cmodel.ProjectName;
            model.Bugs[selected].BugDesc = cmodel.BugDesc;
            model.Bugs[selected].SeverityLevel = cmodel.SeverityLevel;
            model.Bugs[selected].Solution = cmodel.Solution;
            model.Bugs[selected].DateAdded = cmodel.DateAdded;
            model.Bugs[selected].LastModifiedDate = cmodel.LastModifiedDate;
            model.Bugs[selected].ResolvedDate = cmodel.ResolvedDate;
            model.Bugs[selected].Checked = false;

            if(model.Save(model, model.getXmlPath()))
            return RedirectToAction("Detail/" +selected);
            else
            {
                Session["ErrorMessage"] = "Failed To Submit Changes";
                return RedirectToAction("ErrorPage", "Home");
            }
        }
开发者ID:mukund24,项目名称:Project-Center,代码行数:32,代码来源:BugReportsController.cs

示例11: SaveInvestor

 public IEnumerable<Helpers.ErrorInfo> SaveInvestor(Models.Entity.Investor investor)
 {
     return investor.Save();
 }
开发者ID:jsingh,项目名称:DeepBlue,代码行数:4,代码来源:InvestorRepository.cs

示例12: SaveRecording

 public bool SaveRecording(Models.RecordingSchedule Schedule)
 {
     var user = this.GetUser();
     return Schedule.Save(user.Oid);
 }
开发者ID:revenz,项目名称:NextPvrWebConsole,代码行数:5,代码来源:RecordingsController.cs

示例13: SaveFund

 public IEnumerable<Helpers.ErrorInfo> SaveFund(Models.Entity.Fund fund)
 {
     return fund.Save();
 }
开发者ID:jsingh,项目名称:DeepBlue,代码行数:4,代码来源:FundRepository.cs

示例14: UpdateRecurring

 public bool UpdateRecurring(Models.RecurringRecording RecurringRecording)
 {
     var user = this.GetUser();
     return RecurringRecording.Save(user.Oid);
 }
开发者ID:JonnyCam,项目名称:NextPvrWebConsole,代码行数:5,代码来源:RecordingsController.cs


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