public void ทดสอบดึงข้อมูลPK9ตามเลขที่() { PK9DataController service = new PK9DataController(); var result = service.PK9GetByID("7"); Assert.IsNotNull(result); }
public void ทดสอบดึงข้อมูลPK9ทั้งหมด() { PK9DataController service = new PK9DataController(); var result = service.PK9ListAll(); Assert.IsNotNull(result); }
public void ทดสอบแก้ไขPK9() { PK9DataController service = new PK9DataController(); ReceiptDataModel item = new ReceiptDataModel(); UtilLibs utilLibs = new UtilLibs(); DocumentNumber docNum = utilLibs.GetDocumentNo("pk9"); item.DocumentRunno = 4; item.DocumentBookNumber = "1"; item.DocumentNumber = "AC0004"; item.DocumentDate = DateTime.Now; item.PayerType = "1"; item.PayerRunno = 3; item.AsReceiptTo = "ค่าบำรุงพรรคการเมืองรายปี"; item.AsReceiptToRemark = ""; item.ReceiptAmount = 6500; item.ReceiptPayType = ""; item.ReceiptDate = DateTime.Now; item.ReceiptBank = ""; item.ReceiptBillNumber = ""; item.ReceiptChqBank = ""; item.ReceiptChqNumber = ""; item.ReceiptOther = ""; var result = service.PK9DataEdit(item); Assert.IsTrue(result != null); }
public void ทดสอบลบข้อมูล() { PK9DataController service = new PK9DataController(); var result = service.PK9DataDelete("6"); Assert.IsNotNull(result); }
public void ทดสอบบันทึกเอกสารPK9() { PK9DataController service = new PK9DataController(); ReceiptDataModel item = new ReceiptDataModel(); UtilLibs utilLibs = new UtilLibs(); DocumentNumber docNum = utilLibs.GetDocumentNo("pk9"); item.DocumentBookNumber = docNum.BookNo; item.DocumentNumber = docNum.DocumentNo; item.DocumentDate = DateTime.Now; item.PayerType = "2"; item.PayerRunno = 1; item.AsReceiptTo = "ค่าจัดกิจกรรมระดมทุน"; item.AsReceiptToRemark = ""; item.ReceiptAmount = 1750; item.ReceiptPayType = ""; item.ReceiptDate = DateTime.Now; item.ReceiptBank = ""; item.ReceiptBillNumber = ""; item.ReceiptChqBank = ""; item.ReceiptChqNumber = ""; item.ReceiptOther = ""; var result = service.PK9DataAdd(item); Assert.IsTrue(result != null); }