Пример #1
0
        private void ProductEdit_OptionPanel_ButtonClick(object sender, DevExpress.XtraBars.Docking2010.ButtonEventArgs e)
        {
            switch (e.Button.Properties.Caption)
            {
            case "Save":
                if (String.IsNullOrEmpty(path_image))
                {
                    NavFrame.SelectedPageIndex = 2;
                    //MessageBox.Show("Data tidak dimasukan");
                    return;
                }
                NameValueCollection nvc = new NameValueCollection();
                //nvc.Add("part_no", lbl_part_no.Text);
                UploadImage upload = new UploadImage();
                upload.HttpUploadFile("http://localhost/postgresql_laravel/public/upload", path_image, "foto", "image/jpeg", nvc);
                path_image = "";
                NavFrame.SelectedPageIndex = 2;
                MessageBox.Show("Data berhasil dimasukan");
                break;

            default:
                break;
            }
        }