public GarantorViewModel GetGarantorById(int id) { var result = new GarantorViewModel { id = 15, GuarCitizenID = "1111111111119", GuarTitleName = "01", GuarFNameTh = "สมควร", GuarLNameTh = "แก้วงาม", GuarBirthDate = Convert.ToDateTime("17-04-2000"), GuarAgeYear = 23, GuarAgeMonth = 3, GuarExpiryDate = Convert.ToDateTime("17-04-2019"), CitizenStartDate = Convert.ToDateTime("17-04-2001"), CitizenPlace = "สถานที่ออกบัตร", GuarNationality = "02", GuarRace = "03", GuarGender = "ชาย", RelativeDebtor = "คู่สมรส", GuarHomePhone = "038022560", GuarMobilePhone = "0122222222", GuarResidentOwn = "04", GuarResidentOwnDetail = "ระบุ", GuarResidentStatus = "05", GuarResidentYear = 20, GuarResidentMonth = 3, GuarResidentRegStatus = "06", //อาชีพ GuarWorkPeriodAllYear = 21, GuarWorkPeriodAllMonth = 5, GuarWorkPeriodCurrentYear = 22, GuarWorkPeriodCurrentMonth = 6, GuarOfficePhone = "555", GuarOccupationType = "01", GuarOccupationGroup = "01", GuarOccupationCode = "01", GuarPosition = "01", OccPlace = "สถานที่ทำงาน", OccDetail = "รายละเอียดอาชีพ", //รายละเอียดคู่สมรส GuarMateName = "บูญมา มากมี", GuarMateOccupationGroup = "01", GuarMateOccPlace = "สถานทีทำงาน", GuarMateIncome = 5000, GuarMateOccPosition = "ข้าราชการ", GuarMateWorkPeriod = "2", GuarMateTelephone = "039204567", MateExpense = 20000 }; return result; }
public Boolean Insert(GarantorViewModel obj) { if (obj.id != null) { //Update } else { //Insert } return true; }