示例#1
0
        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();
        }
示例#2
0
        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();
        }
示例#3
0
        public ActionResult AddResult(int id = 0)
        {
            Result      obj       = new Result();
            STtblResult objresult = new STtblResult();

            if (id > 0)
            {
                objresult = obj.Getresultbyid(id);
            }
            return(View(objresult));
        }