예제 #1
0
 public void InsertNew(VirtualModel obj, string user, bool flag)
 {
     try
     {
         int            iretVal = 0;
         SqlParameter[] Params  = new SqlParameter[8];
         Params[0]       = new SqlParameter("@OrderNumber", SqlDbType.VarChar);
         Params[0].Value = obj.OrderNumber;
         Params[1]       = new SqlParameter("@Buid", SqlDbType.Int);
         Params[1].Value = obj.Buid;
         Params[2]       = new SqlParameter("@DPID", SqlDbType.VarChar);
         Params[2].Value = obj.DPID;
         Params[3]       = new SqlParameter("@TestCase", SqlDbType.VarChar);
         Params[3].Value = obj.TestCase;
         Params[4]       = new SqlParameter("@User", SqlDbType.VarChar);
         Params[4].Value = user;
         Params[5]       = new SqlParameter("@GossResponse", SqlDbType.VarChar);
         Params[5].Value = obj.GossResponse;
         Params[6]       = new SqlParameter("@flag", SqlDbType.Bit);
         Params[6].Value = flag;
         Params[7]       = new SqlParameter("@id", SqlDbType.Int);
         Params[7].Value = obj.ID;
         iretVal         = SqlHelper.ExecuteNonQuery(con, CommandType.StoredProcedure, "[spAddAndEditResponce]", Params);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
예제 #2
0
        public async Task <IActionResult> Edit(VirtualModel virtualModel)
        {
            var con = _config["ConnectionOS"].ToString();

            _virtualModelRepository.InsertNew(virtualModel, false);
            return(RedirectToAction("Index"));
        }
 public void InsertNew(VirtualModel virtualModel, bool flag = true)
 {
     helper = new DBHelper();
     helper.InsertNew(virtualModel, CommonHelper.GetCurrentUser(), flag);
 }