protected void Page_Load(object sender, EventArgs e) { string strId = Request.QueryString["Id"]; int id = Convert.ToInt32(strId); order = CraftsManDataHelper.GetCraftsManOrderById(id); }
public static CraftsManOrder GetCraftsManOrder(long id) { using (var dc = new RentooloEntities()) { CraftsManOrder item = dc.CraftsManOrder.FirstOrDefault(x => x.Id == id); return(item); } }
public static long AddCraftsManOrder(CraftsManOrder item) { using (var dc = new RentooloEntities()) { var result = dc.CraftsManOrder.Add(item); var res = dc.SaveChanges(); return(result.Id); } }