internal Message Event_Add_Service_Cost(Service_Cost data, int id_event) { Message ms = new Message(); try { var check = (this).Get(a => a.ID == data.ID); if (check == null) { data.Status = "Actived"; (this).Add(data); int id_event1 = Services_Event_Info.Instance().Get_ID_Event(id_event); // int id_detail1 = Services_service_criteria.Instance().Get_ID_Service_Criteria(id_detail); data.ID_Event = id_event1; //for(int i = 1; i <= 8; i++) //{ // data.ID_Service_Criteria = i; //} (this).Update(data); ms.code = "0"; ms.msg = "Thêm thông tin chi phí dịch vụ chuyên nghiệp thành công !"; ms.sub_code = data.ID.ToString(); return(ms); } check.ID_Service_Criteria = data.ID_Service_Criteria; check.ID_Event = data.ID_Event; check.Honorarium_fee = data.Honorarium_fee; check.Air_ticket = data.Air_ticket; check.Meal_fee = data.Meal_fee; check.Hotel_fee = data.Hotel_fee; check.Car_rental = data.Car_rental; check.Other_fees = data.Other_fees; check.Total_costs = data.Total_costs; check.Status = "Actived"; check.Create_Date = data.Create_Date; check.Create_User = data.Create_User; (this).Update(check); ms.code = "0"; ms.msg = "Cập nhật Service Cost thành công !"; ms.sub_code = data.ID.ToString(); return(ms); } catch (Exception ex) { ms.code = "1"; ms.msg = ex.Message; return(ms); } }
internal Message Event_Add_History_Payment(History_Payment data, int id_event) { Message ms = new Message(); try { var check = (this).Get(a => a.ID == data.ID); if (check == null) { data.Status = "Actived"; (this).Add(data); int id_event1 = Services_Event_Info.Instance().Get_ID_Event(id_event); data.Id_Event = id_event1; (this).Update(data); ms.code = "0"; ms.msg = "Thêm thông tin History Payment thành công !"; ms.sub_code = data.ID.ToString(); return(ms); } check.Id_Event = data.Id_Event; check.HCP_Code = data.HCP_Code; check.Number_Contract = data.Number_Contract; check.FromDate = data.FromDate; check.ToDate = data.ToDate; check.Value_Contract = data.Value_Contract; check.PPL_GetContract_Date = data.PPL_GetContract_Date; check.Rep_Name = data.Rep_Name; check.Sup_Name = data.Sup_Name; check.Description = data.Description; check.PPL_Payment_Date = data.PPL_Payment_Date; check.Payment_Value = data.Payment_Value; check.Invoice_Abbott = data.Invoice_Abbott; check.Report_Abbott_Date = data.Report_Abbott_Date; check.Note = data.Note; check.Status = "Actived"; check.Create_Date = data.Create_Date; check.Create_User = data.Create_User; (this).Update(check); ms.code = "0"; ms.msg = "Cập nhật History Payment thành công !"; ms.sub_code = data.ID.ToString(); return(ms); } catch (Exception ex) { ms.code = "1"; ms.msg = ex.Message; return(ms); } }