Ejemplo n.º 1
0
        public void DeleteData(int IDDocument)
        {
            DocumentExport dc = db.DocumentExports.Where(x => x.IDDocument == IDDocument).SingleOrDefault();

            db.DocumentExports.DeleteOnSubmit(dc);
            db.SubmitChanges();
        }
    protected FileContentResult Html2DocxResult(string html, string fileDownloadName)
    {
        byte[] docBytes = DocumentExport.Html2Docx(html);

        FileContentResult result;

        using (var ms = new MemoryStream(docBytes)) {
            result = this.File(ms.ToArray(), "application/msword", fileDownloadName + ".docx");
        }
        return(result);
    }
Ejemplo n.º 3
0
        public void UpdateData(int IDDocument, string DocumentNumber, string NoTK, string CoTK, DateTime Date, string FromStore, string ToStore, string Description, string PartReceived, string PersonReceived, string SoHopDong, string SoHoaDon)
        {
            DocumentExport dc = db.DocumentExports.Where(x => x.IDDocument == IDDocument).SingleOrDefault();

            dc.DocumentNumber = DocumentNumber;
            dc.NoTK           = NoTK;
            dc.CoTK           = CoTK;
            dc.Date           = Date;
            dc.FromStore      = FromStore;
            dc.ToStore        = ToStore;
            dc.Description    = Description;
            dc.PartReceived   = PartReceived;
            dc.PersonReceived = PersonReceived;
            dc.SoHopDong      = SoHopDong;
            dc.SoHoaDon       = SoHoaDon;
            db.SubmitChanges();
        }
Ejemplo n.º 4
0
        public void InsertData(string DocumentNumber, string NoTK, string CoTK, DateTime Date, string FromStore, string ToStore, string Description, int IDEmployee, string PartReceived, string PersonReceived, string SoHopDong, string SoHoaDon)
        {
            DocumentExport dc = new DocumentExport();

            dc.DocumentNumber = DocumentNumber;
            dc.NoTK           = NoTK;
            dc.CoTK           = CoTK;
            dc.Date           = Date;
            dc.FromStore      = FromStore;
            dc.ToStore        = ToStore;
            dc.Description    = Description;
            dc.IDEmployee     = IDEmployee;
            dc.PartReceived   = PartReceived;
            dc.PersonReceived = PersonReceived;
            dc.SoHopDong      = SoHopDong;
            dc.SoHoaDon       = SoHoaDon;
            db.DocumentExports.InsertOnSubmit(dc);
            db.SubmitChanges();
        }