SigTrade.Models.DocumentsRepository.Save C# (CSharp) Method

Save() public method

public Save ( Document d ) : int
d Document
return int
        public int Save(Document d)
        {
            return DB.Save(d);
        }

Usage Example

Esempio n. 1
0
        public static int InsertDocuments(FormCollection collection, int SourceID, int SourceType)
        {
            IDocumentsRepository documents = new DocumentsRepository();

            Document d = new Document();

            d.DateAdded = DateTime.Now;
            d.DocName = collection["DocName"];
            d.DocPath = collection["DocPath"];
            d.RoleAccess = collection["DocAccess"];
            d.DocLegend = collection["txtDocLegend"];

            string docType = collection["docfiletype"];

            if (docType.Equals("upload"))
                d.DocumentType = UpdateUtils.DOC_UPLOADED;
            else if (docType.Equals("hyperlink"))
            {
                d.DocumentType = UpdateUtils.DOC_HYPERLINK;
            }
            d.SourceID = SourceID;
            d.SourceType = SourceType;
            //d.UserID = collection["UserID"];
            d.UserID = Membership.GetUser().ToString();
            
            return documents.Save(d);

        }
All Usage Examples Of SigTrade.Models.DocumentsRepository::Save