public string GetSprSRViewRow(Spr_SR obj) { string ret = String.Empty; ret = "<td class=\"td_btn\"><a class=\"openDialog\" data-dialog-id=\"" + obj.ID.ToString() + "\" data-dialog-title=\"Редактирование торгового агента (" + obj.ТА + ")\" href=\"/Spr/Spr_SREdit/" + obj.ID.ToString() + "\"><img alt=\"Редактировать\" border=\"0\" src=\"/Content/Images/page_edit.png\" /></a> " + "<a Title=\"Просмотреть\" href=\"/Spr/Spr_SRDetails/" + obj.ID.ToString() + "\"><img alt=\"Просмотреть\" border=\"0\" src=\"/Content/Images/page.png\"></a> " + "<a Title=\"Удалить\" href=\"/Spr/Spr_SRDelete/" + obj.ID.ToString() + "\"><img alt=\"Удалить\" border=\"0\" src=\"/Content/Images/page_delete.png\"></a " + "</td>" + "<td>" + obj.SBU + "</td>" + "<td>" + obj.Регион + "</td>" + "<td>" + obj.Область + "</td>" + "<td>" + obj.Дистрибутор + "</td>" + "<td>" + obj.КодТА + "</td>" + "<td>" + obj.ТА + "</td>" + "<td>" + obj.ТипТА + "</td>" + "<td>" + obj.МаршрутТА + "</td>"; return ret; }
public void SaveSpr_SR(Spr_SR obj) { Spr_SR old = GetSpr_SR(obj.ID); old.SBU = obj.SBU; old.Дистрибутор = obj.Дистрибутор; old.КодТА = obj.КодТА; old.МаршрутТА = obj.МаршрутТА; old.Область = obj.Область; old.Регион = obj.Регион; old.ТА = obj.ТА; old.ТипТА = obj.ТипТА; _DB.SaveChanges(); }
public void AddSpr_SR(Spr_SR obj) { _DB.Spr_SR.AddObject(obj); _DB.SaveChanges(); }
/// <summary> /// Deprecated Method for adding a new object to the Spr_SR EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToSpr_SR(Spr_SR spr_SR) { base.AddObject("Spr_SR", spr_SR); }
/// <summary> /// Create a new Spr_SR object. /// </summary> /// <param name="id">Initial value of the ID property.</param> public static Spr_SR CreateSpr_SR(global::System.Guid id) { Spr_SR spr_SR = new Spr_SR(); spr_SR.ID = id; return spr_SR; }
public ActionResult Spr_SREdit(Spr_SR obj, String TypeTA) { if (ModelState.IsValid) { obj.ТипТА = TypeTA; _db.SaveSpr_SR(obj); return Content(_db.GetSprSRViewRow(obj)); // return RedirectToAction("Spr_SRList"); } return View(); }
public ActionResult Spr_SRCreate(Spr_SR obj, String TypeTA) { obj.ID = Guid.NewGuid(); obj.ТипТА = TypeTA; _db.AddSpr_SR(obj); return RedirectToAction("Spr_SRList"); }