public int InsertATest(string challengeid, string userid) { OxcoderIFactory.IFactory factory = new OxcoderFactory.SqlSeverFactory(); OxcoderIDAL.TestInfoIDAL dalad = factory.getTestInstance(); Model.Test test = new Model.Test(); test.Test_ID = Guid.NewGuid().ToString(); test.Test_ChallengeID = challengeid; test.Test_UserID = userid; OxcoderIDAL.ChallengeInfoIDAL ci = factory.getChallengeInstance(); ci.UpdateNum(challengeid,1); return dalad.InsertATest(test); }