コード例 #1
0
 public UserRepository(LogisticDbContext context,
                       VendorsDriverMapRepository repository,
                       SignInManager <ApplicationUser> signInManager,
                       UserManager <ApplicationUser> userManager)
 {
     _context = context;
     _vendorDriverMapRepository = repository;
     _signInManager             = signInManager;
     _userManager = userManager;
 }
コード例 #2
0
 public static void Update(DataGridView dataGridView1)
 {
     using (LogisticDbContext dbContext = new LogisticDbContext())
     {
         object obj = dataGridView1.CurrentRow.DataBoundItem;
         dbContext.Entry(obj).State = EntityState.Modified;
         dbContext.Update(obj);
         dbContext.SaveChanges();
     }
 }
コード例 #3
0
 public DriversController(UserManager <ApplicationUser> userManager,
                          SignInManager <ApplicationUser> signInManager,
                          IUserRepository userRepository,
                          INotificationService notificationService,
                          VendorsDriverMapRepository vendorsDriverRepository,
                          LogisticDbContext db)
 {
     _userManager               = userManager;
     _signInManager             = signInManager;
     _userRepository            = userRepository;
     _notifictionService        = notificationService;
     _vendorDriverMapRepository = vendorsDriverRepository;
     _db = db;
 }
コード例 #4
0
        private void ReportForm_Load(object sender, EventArgs e)
        {
            LogisticDbContext dbContext = new LogisticDbContext();
            var data = from t1 in dbContext.Quotations
                       join t2 in dbContext.Quotation_Items on t1.Q_ID equals t2.Q_ID
                       join t3 in dbContext.Companies on t1.Company_ID equals t3.C_ID
                       join t4 in dbContext.Items on t2.Item_ID equals t4.I_ID
                       where t1.Q_ID == id
                       select new ItemViewModel
            {
                Name          = t4.Name,
                Unit          = t4.Unit,
                Description   = t4.Description,
                Code          = t4.Code,
                Category      = t1.Q_No,
                Quantity      = t2.Quantity,
                Quoted_Amount = t2.Quoted_Amount,

                Total   = t2.Quantity * t2.Quoted_Amount,
                Company = t3.C_Name
            }
            ;
            var reportDataSource1 = new Microsoft.Reporting.WinForms.ReportDataSource();

            reportDataSource1.Name  = "DataSet1";
            reportDataSource1.Value = data.ToList();
            this.reportViewer1.LocalReport.DataSources.Add(reportDataSource1);

            var reportDataSource2 = new Microsoft.Reporting.WinForms.ReportDataSource();

            reportDataSource2.Name  = "DataSet2";
            reportDataSource2.Value = dbContext.Quotations.ToList();
            this.reportViewer1.LocalReport.DataSources.Add(reportDataSource2);

            this.reportViewer1.LocalReport.ReportPath = @"C:\Users\Zakir Awan\Source\Repos\LogisticApp\LogisticAppUI\Report\QuotationReport.rdlc";

            //this.reportViewer1.LocalReport.ReportEmbeddedResource = "QuotationReport.rdlc";
            this.reportViewer1.RefreshReport();
        }
コード例 #5
0
        public CompanyForm()
        {
            InitializeComponent();

            dataGridView1.Anchor = (AnchorStyles.Top | AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Bottom);

            dbContext = new LogisticDbContext();
            Refresh();
            dataGridView1.Columns[0].Visible    = false;
            dataGridView1.Columns[1].HeaderText = "Name";
            dataGridView1.Columns[2].HeaderText = "Address";
            dataGridView1.Columns[3].HeaderText = "Contact";

            DataGridViewButtonColumn col = new DataGridViewButtonColumn();

            col.UseColumnTextForButtonValue = true;
            col.Text = "Delete";
            col.Name = "Delete";
            dataGridView1.Columns.Add(col);

            dataGridView1.Columns[dataGridView1.Columns.Count - 2].Visible = false;
            dataGridView1.CellClick += new DataGridViewCellEventHandler(dataGridView1_CellContentClick);
        }
コード例 #6
0
 public StocksGatewayDb(LogisticDbContext context)
 {
     _context = context;
 }
コード例 #7
0
 public ErrorLogRepository(LogisticDbContext context) : base(context)
 {
     _context = context;
 }
コード例 #8
0
 public IndustryTypeRepository(LogisticDbContext context) : base(context)
 {
     _context = context;
 }
コード例 #9
0
 public RepositoryBase()
 {
     _Context = new LogisticDbContext();
 }
コード例 #10
0
 public CompanySizeRepository(LogisticDbContext context) : base(context)
 {
     _context = context;
 }
コード例 #11
0
 public CountryRepository(LogisticDbContext context) : base(context)
 {
     _context = context;
 }
コード例 #12
0
 public ProductsGatewayDb(LogisticDbContext context)
 {
     _context = context;
 }
コード例 #13
0
 public VendorsDriverMapRepository(LogisticDbContext context) : base(context)
 {
     _context = context;
 }
コード例 #14
0
 public WorkersGatewayDb(LogisticDbContext context)
 {
     _context = context;
 }
コード例 #15
0
 public OrderRepository(LogisticDbContext context) : base(context)
 {
     _context = context;
 }
コード例 #16
0
 public BaseRepository(LogisticDbContext context)
 {
     this.context = context;
     this.dbSet   = context.Set <T>();
 }