Example #1
0
        public void DeleteData(int IDDetail)
        {
            DetailDocumentExport de = db.DetailDocumentExports.Where(x => x.IDDetail == IDDetail).SingleOrDefault();

            db.DetailDocumentExports.DeleteOnSubmit(de);
            db.SubmitChanges();
        }
Example #2
0
        public void UpdateData(int IDDetail, string StyleNo, string MaterialStyle, string MaterialDetails, string Unit, float NumberRequest, float NumberReceived, decimal price, decimal TotalAmount)
        {
            DetailDocumentExport de = db.DetailDocumentExports.Where(x => x.IDDetail == IDDetail).SingleOrDefault();

            de.StyleNo         = StyleNo;
            de.MaterialStyle   = MaterialStyle;
            de.MaterialDetails = MaterialDetails;
            de.Unit            = Unit;
            de.NumberRequest   = NumberRequest;
            de.NumberReceived  = NumberReceived;
            de.Price           = price;
            de.TotalAmount     = TotalAmount;
            db.SubmitChanges();
        }
Example #3
0
        public void InsertData(int IDDocument, string StyleNo, string MaterialStyle, string MaterialDetails, string Unit, float NumberRequest, float NumberReceived, decimal price, decimal TotalAmount)
        {
            DetailDocumentExport de = new DetailDocumentExport();

            de.IDDocument      = IDDocument;
            de.StyleNo         = StyleNo;
            de.MaterialStyle   = MaterialStyle;
            de.MaterialDetails = MaterialDetails;
            de.Unit            = Unit;
            de.NumberRequest   = NumberRequest;
            de.NumberReceived  = NumberReceived;
            de.Price           = price;
            de.TotalAmount     = TotalAmount;
            db.DetailDocumentExports.InsertOnSubmit(de);
            db.SubmitChanges();
        }