Example #1
0
        public IActionResult New(Affair affair, AffairDetail affairDetail, List <AffairEmployeeDetail> affairEmployeeDetail,
                                 List <AffairVehicleDetail> affairVehicleDetail)
        {
            string customerSignName = affairDetail.SignatureDate.ToShortDateString() + affairDetail.CustomerInfo + ".svg";
            string customerBase64   = affairDetail.CustomerSignaturePath.Replace("data:image/svg+xml;base64,", "");

            _converter.ConvertFile(customerSignName, customerBase64);
            affairDetail.CustomerSignaturePath = customerSignName;
            string employeeSignName = affairDetail.SignatureDate.ToShortDateString() + affairDetail.EmployeeId + ".svg";
            string employeeBase64   = affairDetail.SignaturePath.Replace("data:image/svg+xml;base64,", "");

            _converter.ConvertFile(employeeSignName, employeeBase64);
            affairDetail.SignaturePath = employeeSignName;

            return(RedirectToAction(nameof(Index)));
        }
 public void Update(AffairDetail affairDetail)
 {
     _affairDetailDal.Update(affairDetail);
 }
 public void Delete(AffairDetail affairDetail)
 {
     _affairDetailDal.Delete(affairDetail);
 }
 public void Add(AffairDetail affairDetail)
 {
     _affairDetailDal.Add(affairDetail);
 }