예제 #1
0
        public string GetNewEmployeeNumber(int BranchID, string DocumentId, string UserName)
        {
            HRDataContext entities = new HRDataContext();

            return(entities.Database.SqlQuery <string>("Exec [Utility].[usp_GenerateDocumentNumber] @BranchID, @DocumentId, @TrxDate, @UserId",
                                                       new SqlParameter("BranchID", BranchID),
                                                       new SqlParameter("DocumentId", DocumentId),
                                                       new SqlParameter("TrxDate", DateTime.Now.Date),
                                                       new SqlParameter("UserId", UserName)).FirstOrDefault <string>());
        }
예제 #2
0
 public Repository(HRDataContext context)
 {
     this.hrDbContext = context;
 }