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


C# Models.getXmlPath方法代码示例

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


在下文中一共展示了Models.getXmlPath方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: 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

示例3: 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

示例4: 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


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