Пример #1
0
        private void btnProInsert_Click(object sender, EventArgs e)
        {
            try
            {
                if (this.ValidateRegistration())
                {
                    ProductInfoVO pro = new ProductInfoVO();
                    pro.Pro_Name  = txtProName.Text.Trim();
                    pro.Pro_Price = txtProPrice.Text.Trim();
                    pro.Pro_Code  = txtProCode.Text.Trim();
                    //pro.ProductDate = txtDate.Text;
                    //pro.ProductDateEnd = txtEndDate.Text;//유통기한 조정필요
                    pro.Pro_Count = Convert.ToInt32(cboQuantity.Text);
                    pro.Pro_Note  = txtNotes.Text.Trim();
                    //이미지 => byte[] 변환 VO 속성에 저장
                    FileStream fs     = new FileStream(pbxImage.ImageLocation, FileMode.Open, FileAccess.Read);
                    byte[]     bImage = new byte[fs.Length];
                    fs.Read(bImage, 0, (int)fs.Length);
                    pro.Pro_Image = bImage;



                    Service.ProductService ser = new Service.ProductService();
                    bool bResult = ser.RegisterProduct(pro);
                    if (bResult)
                    {
                        MessageBox.Show("성공적으로 등록 되었습니다!.");
                    }
                    else
                    {
                        MessageBox.Show("신규 등록 중 오류가 발생했습니다. 다시시도하여 주십시오.");
                    }
                }
                else
                {
                    this.ShowErrorMessage(this.errorMessage, "신규 등록 에러");
                }
            }
            catch (Exception err)
            {
                this.ShowErrorMessage(err);
            }
        }
Пример #2
0
        public async Task <ActionResult> Index()
        {
            if (Session["SellerInstall"] != null)
            {
                ViewBag.shopOrigin = Session["SellerInstall"].ToString();
            }
            if (Session["domain"] != null)
            {
                ViewBag.shopOrigin = Session["domain"].ToString();
            }
            if (HttpContext.Request.Cookies[".App.Handshake.ShopUrl"] != null)
            {
                HttpCookie cookie = HttpContext.Request.Cookies.Get(".App.Handshake.ShopUrl");
                ViewBag.shopOrigin = cookie.Value;
            }

            //          Models.Settings.SchedulerSettingModel data = await _iProductService.GetSettingsByShopUrl(ViewBag.shopOrigin);
            Models.Settings.SchedulerSettingModel data = await _iProductService.GetSettingsByShopUrl("ocp-import.myshopify.com");

            if (data == null)
            {
                data       = new Models.Settings.SchedulerSettingModel();
                data.brand = "";
            }
            // var data =await _iProductService.ProcessXmlProducts();
            Service.ProductService ps = new Service.ProductService();
            //   ps.DownloadFileSFTP();
            //  await Helper.ProcessPendingFilesSchedule.ProcessPendingFilesScheduleJobSync("1", 1);
            //   Models.EDM.db_OCP_ImportEntities db = new Models.EDM.db_OCP_ImportEntities();
            //  var seller = await db.tblSchedulerSettings.Where(x => x.SellerId == 5).FirstOrDefaultAsync();
            //  var downloadResult = ps.DownloadFileSFTP(seller.FtpHost, seller.FtpUserName, seller.FtpPassword, seller.FtpFilePath, 5);
            //       await ps.ProcessXmlProducts(5);
            //    await ps.ProcessXmlProducts(5);
            //         await ps.SyncProducts(5);

            return(View(data));
        }
 public ProductListPresenter(IProductListView ProductListView, Service.ProductService ProductService)
 {
     _productService  = ProductService;
     _productListView = ProductListView;
 }
Пример #4
0
 public ProductListPresenter(IProductListView productListView, Service.ProductService productService)
 {
     this.productService  = productService;
     this.productListView = productListView;
 }
 public ProductListPresenter(IProductListView ProductListView, Service.ProductService ProductService)
 {
     _productListView = ProductListView;
     _productService = ProductService;
 }
Пример #6
0
 public ProductListPresenter(IProductListView view, Service.ProductService service)
 {
     _productListview = view;
     _productService  = service;
 }
Пример #7
0
 public ProductListPresenter(IProductListView productListView, Service.ProductService productService)
 {
     this._productListView = productListView;
     this._productService = productService;
 }