예제 #1
0
        public CategoryForm()
        {
            InitializeComponent();
            dgv.MultiSelect      = false;
            dgv.SelectionMode    = DataGridViewSelectionMode.FullRowSelect;
            this.FormBorderStyle = FormBorderStyle.FixedDialog;
            this.MinimizeBox     = false;
            this.MaximizeBox     = false;
            ChannelFactory <IBussinessLogic> chanel = new ChannelFactory <IBussinessLogic>("ClientEndPoint");

            proxy = chanel.CreateChannel();
            getDataSource();
            if (table.Rows.Count > 0)
            {
                current.ID   = (int)table.Rows[0][0];
                current.name = table.Rows[0][1].ToString();
            }
        }
예제 #2
0
        public UpdateBook(int ID)
        {
            InitializeComponent();
            ChannelFactory <IBussinessLogic> chanel = new ChannelFactory <IBussinessLogic>("ClientEndPoint");

            proxy = chanel.CreateChannel();
            book  = proxy.GetBookDataByID(ID);
            ListAuthors.DataSource     = proxy.GetAllBookAuthor();
            ListAuthors.DisplayMember  = "name";
            ListAuthors.ValueMember    = "id";
            ListCategory.DataSource    = proxy.GetBookAllCategory();
            ListCategory.DisplayMember = "name";
            ListCategory.ValueMember   = "id";
            cboPublisher.DataSource    = proxy.getAllPublisher();
            cboPublisher.DisplayMember = "name";
            cboPublisher.ValueMember   = "id";
            ListAuthors.ClearSelected();
            ListCategory.ClearSelected();
            ListAuthors.SelectionMode  = SelectionMode.MultiExtended;
            ListCategory.SelectionMode = SelectionMode.MultiExtended;
            this.MaximizeBox           = false;
            this.MinimizeBox           = false;
        }
예제 #3
0
        static void Main(string[] args)
        {
            ChannelFactory <IBussinessLogic> chanel = new ChannelFactory <IBussinessLogic>("ClientEndPoint");
            IBussinessLogic proxy = chanel.CreateChannel();

            //AuthorData a = new AuthorData();
            //a.ID = 1;
            //a.name = "test update222222";
            //bool rs = proxy.AddAuthor(a);
            //BookData b = new BookData();
            //b.ISBN = "Test Book";
            //b.Name = "Book";
            //b.Price = 2;
            //b.Publisher_ID = 1;
            //b.Quantity = 3;
            //b.Status = "C#";

            /*
             * string publisher = "LT";
             * DataTable rs = proxy.SearchBookByPublisher(publisher);
             * foreach (DataRow item in rs.Rows)
             * {
             *  Console.WriteLine(item["ID"].ToString());
             * }
             *
             *
             * //bool rs = proxy.IAddBook(b);
             * Console.WriteLine(rs);
             * Console.ReadLine();
             */
            Console.WriteLine(proxy.AddAccount(new AccountData()
            {
                username = "******",
                password = "******"
            }));
        }
예제 #4
0
 public LibrosController(ILogger <LibrosController> logger, IRepositorio repositorio, IBussinessLogic _CapaLogica)
 {
     _logger      = logger;
     _repositorio = repositorio;
     CapaLogica   = _CapaLogica;
 }
예제 #5
0
 public Application(IBussinessLogic bussinessLogic)
 {
     this._bussinessLogic = bussinessLogic;
 }
예제 #6
0
 public LoginController(IConfiguration _config, IBussinessLogic _CapaLogica)
 {
     config     = _config;
     CapaLogica = _CapaLogica;
 }
예제 #7
0
 public CarModelsController()
 {
     _carModelRepository = new CarModelRepository();
     _bussinessLogic     = new BussinessLogic();
 }