public void SaveResult(string Result_Heading, string Result_Text) { STtblResult objtblResult = new STtblResult(); objtblResult.Result_Date = DateTime.Now; objtblResult.Result_Heading = Result_Heading; objtblResult.Result_Text = Result_Text; objtblResult.tblUserId = 1; nj.STtblResults.Add(objtblResult); nj.SaveChanges(); }
public void SaveResult(Result obj, int Userid) { STtblResult objtblResult = new STtblResult(); objtblResult.Result_Date = DateTime.Now; objtblResult.Result_Heading = obj.Result_Heading; objtblResult.Result_Text = obj.Result_Text; objtblResult.tblUserId = Userid; dbentity.STtblResults.Add(objtblResult); dbentity.SaveChanges(); }
public ActionResult AddResult(int id = 0) { Result obj = new Result(); STtblResult objresult = new STtblResult(); if (id > 0) { objresult = obj.Getresultbyid(id); } return(View(objresult)); }