Exemplo n.º 1
0
 private void commandButton1_Click(object sender, EventArgs e)
 {
     using (Database db = new Database(GlobalVar.DBName))
     {
         db.Commands.Add(db.CreateCommand("usp_CF_RencanaPembayaranDetail_UPDATE"));
         if (Modus == enumModus.Update)
         {
             db.Commands[0].Parameters.Add(new Parameter("@RowID", SqlDbType.UniqueIdentifier, dgDetail.SelectedCells[0].OwningRow.Cells["RowIDD"].Value));
         }
         else
         {
             db.Commands[0].Parameters.Add(new Parameter("@HeaderRowID", SqlDbType.UniqueIdentifier, dgJnsTransaksi.SelectedCells[0].OwningRow.Cells["RowID"].Value));
         }
         db.Commands[0].Parameters.Add(new Parameter("@TglBukti", SqlDbType.Date, dateBukti.DateValue));
         db.Commands[0].Parameters.Add(new Parameter("@NoBukti", SqlDbType.VarChar, textNoBukti.Text.ToString()));
         db.Commands[0].Parameters.Add(new Parameter("@TglTempo", SqlDbType.Date, dateTempo.DateValue));
         db.Commands[0].Parameters.Add(new Parameter("@LastUpdatedBy", SqlDbType.VarChar, SecurityManager.UserInitial));
         db.Commands[0].ExecuteNonQuery();
     }
     dgDetail.Focus();
     panelUPDATE.Visible = false;
     Modus = enumModus.Clear;
     SetEnableDisable();
     RefreshDataGridDetail();
 }
Exemplo n.º 2
0
 public frmDebetKreditNotaUpdate(Form Caller)
 {
     InitializeComponent();
     Modus       = enumModus.New;
     Brow        = enumBrow.Header;
     this.Caller = Caller;
 }
Exemplo n.º 3
0
 private void cmdEDIT_Click(object sender, EventArgs e)
 {
     panelUPDATE.Visible = true;
     Modus = enumModus.Update;
     SetEnableDisable();
     RefreshDataUpdate();
 }
Exemplo n.º 4
0
 private void commandButton2_Click(object sender, EventArgs e)
 {
     dgDetail.Focus();
     panelUPDATE.Visible = false;
     Modus = enumModus.Clear;
     SetEnableDisable();
 }
Exemplo n.º 5
0
 private void cmdEDIT1_Click(object sender, EventArgs e)
 {
     Modus = enumModus.Update;
     SetupEnableDisable(true);
     DisplayHeader();
     txtTransakiCF.Focus();
 }
Exemplo n.º 6
0
 private void cmdEDIT2_Click(object sender, EventArgs e)
 {
     Modus = enumModus.Update;
     SetupEnableDisable(true);
     DisplayDetail();
     cboTransaksiFinance.Focus();
 }
Exemplo n.º 7
0
 private void frmCF_RencanaPembayaran_Load(object sender, EventArgs e)
 {
     InitControl();
     RefreshDataGrid();
     RefreshData();
     Modus = enumModus.Clear;
 }
Exemplo n.º 8
0
        private void cmdSAVE_Click(object sender, EventArgs e)
        {
            Guid _RowID = Guid.Empty;

            if (Modus == enumModus.Update)
            {
                _RowID = (Guid)dgPerkiraan.SelectedCells[0].OwningRow.Cells["RowID"].Value;
            }
            string _NoPerkiraan = lookupPerkiraan1.NoPerkiraan;
            string _Uraian      = lookupPerkiraan1.NamaPerkiraan;

            using (Database db = new Database(GlobalVar.DBName))
            {
                db.Commands.Add(db.CreateCommand("usp_AccBy_Tabel_UPDATE"));
                if (Modus == enumModus.Update)
                {
                    db.Commands[0].Parameters.Add(new Parameter("@RowID", SqlDbType.UniqueIdentifier, _RowID));
                }
                db.Commands[0].Parameters.Add(new Parameter("@NoPerkiraan", SqlDbType.VarChar, _NoPerkiraan));
                db.Commands[0].Parameters.Add(new Parameter("@Uraian", SqlDbType.VarChar, _Uraian));
                db.Commands[0].ExecuteNonQuery();
            }
            Modus = enumModus.Clear;
            SetupEnableDisable();
            RefreshGrid();
            RefreshText();
        }
Exemplo n.º 9
0
 private void cmdADD_Click(object sender, EventArgs e)
 {
     Modus = enumModus.New;
     lookupPerkiraan1.NoPerkiraan   = "";
     lookupPerkiraan1.NamaPerkiraan = "";
     SetupEnableDisable();
 }
Exemplo n.º 10
0
 public frmHiRegisterUpdate(Form Caller)
 {
     InitializeComponent();
     Modus       = enumModus.New;
     Brow        = enumBrow.Header;
     this.Caller = Caller;
 }
Exemplo n.º 11
0
        private void cmdSAVED_Click(object sender, EventArgs e)
        {
            Double Nominal = Convert.ToDouble(textAmount.Text) * Convert.ToDouble(textKurs.Text);
            int    Tgl     = dateTempo.DateValue.Value.Day;

            using (Database db = new Database(GlobalVar.DBName))
            {
                db.Commands.Add(db.CreateCommand("usp_CF_RencanaPembayaranDetail_UPDATE"));
                if (Modus == enumModus.Update)
                {
                    db.Commands[0].Parameters.Add(new Parameter("@RowID", SqlDbType.UniqueIdentifier, dgDetail.SelectedCells[0].OwningRow.Cells["RowIDD"].Value));
                }
                else
                {
                    db.Commands[0].Parameters.Add(new Parameter("@HeaderRowID", SqlDbType.UniqueIdentifier, dgVendor.SelectedCells[0].OwningRow.Cells["RowID"].Value));
                }
                db.Commands[0].Parameters.Add(new Parameter("@TglBukti", SqlDbType.Date, dateBukti.DateValue));
                db.Commands[0].Parameters.Add(new Parameter("@NoBukti", SqlDbType.VarChar, textNoBukti.Text.ToString()));
                db.Commands[0].Parameters.Add(new Parameter("@TglTempo", SqlDbType.Date, dateTempo.DateValue));
                db.Commands[0].Parameters.Add(new Parameter("@Amount", SqlDbType.Money, Convert.ToDouble(textAmount.Text)));
                db.Commands[0].Parameters.Add(new Parameter("@Kurs", SqlDbType.Money, Convert.ToDouble(textKurs.Text)));
                db.Commands[0].Parameters.Add(new Parameter("@LastUpdatedBy", SqlDbType.VarChar, SecurityManager.UserInitial));
                db.Commands[0].ExecuteNonQuery();
            }
            dgDetail.Focus();
            panelUPDATE.Visible = false;
            Modus = enumModus.Clear;
            SetEnableDisable();
            RefreshDataGridDetail();
            dgDetail.FindRow("NoBukti", textNoBukti.Text.ToString());
            _lTxtJumlah[Tgl - 1].Text = Nominal.ToString();
            cmdSAVE_Click(sender, e);
        }
Exemplo n.º 12
0
 private void frmAccBiaya_Load(object sender, EventArgs e)
 {
     Modus = enumModus.Clear;
     SetEnable();
     IsiComboDownload();
     RefreshGrid();
 }
Exemplo n.º 13
0
 private void cmdADD1_Click(object sender, EventArgs e)
 {
     Modus = enumModus.New;
     SetupEnableDisable(true);
     txtTransakiCF.Text       = "";
     cboGroupCF.SelectedValue = "";
     txtTransakiCF.Focus();
 }
Exemplo n.º 14
0
 private void frmCF_RencanaLuarNegeri_Load(object sender, EventArgs e)
 {
     InitControl();
     SetEnableDisable();
     RefreshDataGrid();
     RefreshData();
     Modus = enumModus.Clear;
 }
Exemplo n.º 15
0
 public frmDebetKreditNotaUpdate(Form Caller, Guid HeaderID)
 {
     InitializeComponent();
     Modus       = enumModus.Update;
     Brow        = enumBrow.Header;
     _HeaderID   = HeaderID;
     this.Caller = Caller;
 }
Exemplo n.º 16
0
 public frmHiRegisterUpdate(Form Caller, Guid HeaderID)
 {
     InitializeComponent();
     Modus       = enumModus.Update;
     Brow        = enumBrow.Header;
     _HeaderID   = HeaderID;
     this.Caller = Caller;
 }
Exemplo n.º 17
0
        private void cmdDownloadGo_Click(object sender, EventArgs e)
        {
            string _paths  = string.Empty;
            string PilData = _Data;

            Stream         myStream        = null;
            OpenFileDialog openFileDialog1 = new OpenFileDialog();

            openFileDialog1.InitialDirectory = "C:\\TEMP\\FTP\\DOWNLOAD";   //GlobalVar.DbfDownload;
            openFileDialog1.Filter           = "xml files (*.xml)|*" + PilData + "*.xml";
            //openFileDialog1.FilterIndex = 1;
            //openFileDialog1.RestoreDirectory = true;


            if (openFileDialog1.ShowDialog() == DialogResult.OK)
            {
                if ((myStream = openFileDialog1.OpenFile()) != null)
                {
                    _paths = openFileDialog1.FileName;

                    if (MessageBox.Show("Download Data ini " + openFileDialog1.FileNames[0].ToString() + " ?", "Download", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
                    {
                        return;
                    }

                    this.Cursor = Cursors.WaitCursor;

                    try
                    {
                        //lblStatus.Text = "Download file from FTP ...";
                        DataSet ds = ReadData(_paths);

                        //lblStatus.Text = "Upload data to ISA ....";
                        refreshForm();
                        ProcessTable(ds);

                        MessageBox.Show(Messages.Confirm.DownloadSuccess);
                        //RefreshBudget();
                    }
                    catch (Exception ex)
                    {
                        Error.LogError(ex);
                    }
                    finally
                    {
                        this.Cursor = Cursors.Default;
                    }
                }
                Modus = enumModus.Clear;
                SetEnable();
                RefreshDetail();
                RefreshHeader();
            }
        }
Exemplo n.º 18
0
 public frmPerkiraanKoneksiArusKasUpdate(Guid HeaderID, Form Caller)
 {
     InitializeComponent();
     _HeaderID   = HeaderID;
     this.Caller = Caller;
     if (GlobalVar.PerusahaanID != "HLD")
     {
         lookUpPerkiraan1.Enabled = false;
     }
     Modus = enumModus.New;
 }
Exemplo n.º 19
0
        private void cmdUPLOAD_Click(object sender, EventArgs e)
        {
            DataTable dt       = new DataTable();
            string    Physical = GlobalVar.DbfUpload + "\\" + "TransAccTmp.DBF";

            files.Add(Physical);
            if (File.Exists(Physical))
            {
                File.Delete(Physical);
            }
            using (Database db = new Database(GlobalVar.DBName))
            {
                db.Commands.Add(db.CreateCommand("usp_AccBy_Ajuan_UPLOAD"));
                db.Commands[0].Parameters.Add(new Parameter("@FromDate", SqlDbType.Date, rangeDateBox1.FromDate));
                db.Commands[0].Parameters.Add(new Parameter("@ToDate", SqlDbType.Date, rangeDateBox1.ToDate));
                db.Commands[0].Parameters.Add(new Parameter("@GudangID", SqlDbType.VarChar, GlobalVar.Gudang));
                db.Commands[0].Parameters.Add(new Parameter("@UploadKe11", SqlDbType.Date, DateTime.Today));
                dt = db.Commands[0].ExecuteDataTable();
            }
            List <Foxpro.DataStruct> fields = new List <Foxpro.DataStruct>();

            fields.Add(new Foxpro.DataStruct("RowID", "RowID", Foxpro.enFoxproTypes.Char, 36));
            fields.Add(new Foxpro.DataStruct("CabangID", "CabangID", Foxpro.enFoxproTypes.Char, 4));
            fields.Add(new Foxpro.DataStruct("TglAjuan", "TglAjuan", Foxpro.enFoxproTypes.DateTime, 8));
            fields.Add(new Foxpro.DataStruct("Transaksi", "Transaksi", Foxpro.enFoxproTypes.Char, 5));
            fields.Add(new Foxpro.DataStruct("NoPerk", "NoPerk", Foxpro.enFoxproTypes.Char, 12));
            fields.Add(new Foxpro.DataStruct("NoBukti", "NoBukti", Foxpro.enFoxproTypes.Char, 15));
            fields.Add(new Foxpro.DataStruct("Uraian", "Uraian", Foxpro.enFoxproTypes.Char, 55));
            fields.Add(new Foxpro.DataStruct("Rp", "Rp", Foxpro.enFoxproTypes.Numeric, 17));
            fields.Add(new Foxpro.DataStruct("NoAcc", "NoAcc", Foxpro.enFoxproTypes.Char, 15));
            fields.Add(new Foxpro.DataStruct("TglAcc", "TglAcc", Foxpro.enFoxproTypes.DateTime, 8));
            fields.Add(new Foxpro.DataStruct("Keterangan", "Keterangan", Foxpro.enFoxproTypes.Char, 55));
            fields.Add(new Foxpro.DataStruct("UploadKe11", "UploadKe11", Foxpro.enFoxproTypes.DateTime, 8));
            fields.Add(new Foxpro.DataStruct("UploadKe00", "UploadKe00", Foxpro.enFoxproTypes.DateTime, 8));

            Foxpro.WriteFile(GlobalVar.DbfUpload, "TransAccTmp", fields, dt);
            ZipFile(files);
            MessageBox.Show(Messages.Confirm.ProcessFinished + ". Lokasi file: " + GlobalVar.DbfUpload + "\\ISA-AjuanACCBiaya.zip");

            using (Database db = new Database(GlobalVar.DBName))
            {
                db.Commands.Add(db.CreateCommand("usp_AccBy_Ajuan_UPLOAD"));
                db.Commands[0].Parameters.Add(new Parameter("@FromDate", SqlDbType.Date, rangeDateBox1.FromDate));
                db.Commands[0].Parameters.Add(new Parameter("@ToDate", SqlDbType.Date, rangeDateBox1.ToDate));
                db.Commands[0].Parameters.Add(new Parameter("@GudangID", SqlDbType.VarChar, GlobalVar.Gudang));
                db.Commands[0].Parameters.Add(new Parameter("@UploadKe11", SqlDbType.Date, DateTime.Today));
                db.Commands[0].Parameters.Add(new Parameter("@IsUpdate", SqlDbType.Bit, true));
                db.Commands[0].ExecuteNonQuery();
            }
            Modus = enumModus.Clear;
            RefreshGrid();
        }
Exemplo n.º 20
0
        private void frmBiayaOperasionalBrowse_Load(object sender, EventArgs e)
        {
            this.WindowState = FormWindowState.Maximized;

            rdbTanggal.FromDate = GlobalVar.DateOfServer;
            rdbTanggal.ToDate   = GlobalVar.DateOfServer;

            selectedGrid = GridSelection.Header;

            cmdSearch_Click(sender, e);
            Modus = enumModus.Clear;
            SetEnable();
        }
Exemplo n.º 21
0
 public frmPerkiraanKoneksiArusKasUpdate(string noPerkiraan, string keterangan, Guid RowID, Form Caller)
 {
     InitializeComponent();
     lookUpPerkiraan1.NoPerkiraan = noPerkiraan;
     txtKeterangan.Text           = keterangan;
     _RowID      = RowID;
     this.Caller = Caller;
     if (GlobalVar.PerusahaanID != "HLD")
     {
         lookUpPerkiraan1.Enabled = false;
     }
     Modus = enumModus.Update;
 }
Exemplo n.º 22
0
 private void cmdADD1_Click(object sender, EventArgs e)
 {
     eModus = enumModus.New;
     SetupEnable(true);
     if (eGrid == enumGrid.Satu)
     {
         txtCF.Text = "";
     }
     else
     {
         txtTrans.Text = "";
     }
 }
Exemplo n.º 23
0
 public frmHiRegisterUpdate(Form Caller, Guid HeaderID, Guid DetailID)
 {
     InitializeComponent();
     Brow = enumBrow.Detail;
     if (DetailID == Guid.Empty)
     {
         Modus = enumModus.New;
     }
     else
     {
         Modus = enumModus.Update;
     }
     _HeaderID   = HeaderID;
     _DetailID   = DetailID;
     this.Caller = Caller;
 }
Exemplo n.º 24
0
 private void cmdDELETE_Click(object sender, EventArgs e)
 {
     if (MessageBox.Show("Anda yakin akan menghapus data ini?", "Hapus data", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.OK)
     {
         Guid _RowID = (Guid)dgPerkiraan.SelectedCells[0].OwningRow.Cells["RowID"].Value;
         using (Database db = new Database(GlobalVar.DBName))
         {
             db.Commands.Add(db.CreateCommand("usp_AccBy_Tabel_UPDATE"));
             db.Commands[0].Parameters.Add(new Parameter("@RowID", SqlDbType.UniqueIdentifier, _RowID));
             db.Commands[0].ExecuteNonQuery();
         }
         Modus = enumModus.Clear;
         SetupEnableDisable();
         RefreshGrid();
         RefreshText();
     }
 }
Exemplo n.º 25
0
 public frmDebetKreditNotaUpdate(Form Caller, Guid HeaderID, Guid DetailID, string IsiPin)
 {
     InitializeComponent();
     Brow = enumBrow.Detail;
     if (DetailID == Guid.Empty)
     {
         Modus = enumModus.New;
     }
     else
     {
         Modus = enumModus.Update;
     }
     _HeaderID   = HeaderID;
     _DetailID   = DetailID;
     _IsiPin     = IsiPin;
     this.Caller = Caller;
 }
Exemplo n.º 26
0
 public frmDKNupdate(Form Caller, Guid HeaderID, Guid DetailID, string RecID, string RecIDDetail)
 {
     InitializeComponent();
     Brow = enumBrow.Detail;
     if (DetailID == Guid.Empty)
     {
         Modus = enumModus.New;
     }
     else
     {
         Modus = enumModus.Update;
     }
     _HeaderID    = HeaderID;
     _DetailID    = DetailID;
     _RecID       = RecID;
     _RecIDDetail = RecIDDetail;
     this.Caller  = Caller;
 }
Exemplo n.º 27
0
 private void cmdUPDATE_Click(object sender, EventArgs e)
 {
     if (Tools.isNull(dgTransAccBiaya.SelectedCells[0].OwningRow.Cells["TglAcc"].Value, "").ToString() == "")
     {
         txt00.Text            = dgTransAccBiaya.SelectedCells[0].OwningRow.Cells["CabangID"].Value.ToString();
         txtTglAjuan.DateValue = (DateTime)dgTransAccBiaya.SelectedCells[0].OwningRow.Cells["TglPengajuan"].Value;
         txtTransaksi.Text     = dgTransAccBiaya.SelectedCells[0].OwningRow.Cells["Transaksi"].Value.ToString();
         txtUraian.Text        = dgTransAccBiaya.SelectedCells[0].OwningRow.Cells["Uraian"].Value.ToString();
         txtJumlah.Text        = dgTransAccBiaya.SelectedCells[0].OwningRow.Cells["Jumlah"].Value.ToString();
         txtNoAcc.Text         = dgTransAccBiaya.SelectedCells[0].OwningRow.Cells["NoAcc"].Value.ToString();
         txtTglAcc.DateValue   = GlobalVar.GetServerDate;
         txtKeterangan.Text    = dgTransAccBiaya.SelectedCells[0].OwningRow.Cells["Keterangan"].Value.ToString();
         Modus = enumModus.Update;
         SetEnable();
     }
     else
     {
         MessageBox.Show("Data dimaksud sudah pernah diAcc/diTolak", "Perhatian!");
     }
 }
Exemplo n.º 28
0
 private void cmdUpdateSave_Click(object sender, EventArgs e)
 {
     if (txtNoAcc.Text == "" && txtKeterangan.Text == "")
     {
         MessageBox.Show("Jika ditolak, silahkan isi alasan penolakannya di kolom Keterangan", "Perhatian!");
     }
     else
     {
         Guid _RowID = (Guid)dgTransAccBiaya.SelectedCells[0].OwningRow.Cells["RowID"].Value;
         using (Database db = new Database(GlobalVar.DBName))
         {
             db.Commands.Add(db.CreateCommand("usp_AccBy_Ajuan_UPDATE"));
             db.Commands[0].Parameters.Add(new Parameter("@RowID", SqlDbType.UniqueIdentifier, _RowID));
             db.Commands[0].Parameters.Add(new Parameter("@NoAcc", SqlDbType.VarChar, txtNoAcc.Text));
             db.Commands[0].Parameters.Add(new Parameter("@TglAcc", SqlDbType.Date, txtTglAcc.DateValue));
             db.Commands[0].Parameters.Add(new Parameter("@Keterangan", SqlDbType.VarChar, txtKeterangan.Text));
             db.Commands[0].ExecuteNonQuery();
         }
         Modus = enumModus.Clear;
         RefreshData();
         SetEnable();
     }
 }
Exemplo n.º 29
0
        private void cmdDownloadGo_Click(object sender, EventArgs e)
        {
            _tempPath = GlobalVar.DbfDownload + "\\AccBiaya\\";
            if (!Directory.Exists(_tempPath))
            {
                Directory.CreateDirectory(_tempPath);
            }
            else
            {
                string[] files = Directory.GetFiles(_tempPath);
                foreach (string file in files)
                {
                    File.Delete(file);
                }
            }
            Zip.UnZipFiles(fileZipName, _tempPath, false);

            DownloadProses();
            MessageBox.Show(Messages.Confirm.ProcessFinished);
            Modus = enumModus.Clear;
            SetEnable();
            RefreshGrid();
        }
Exemplo n.º 30
0
 private void cmdDownloadClose_Click(object sender, EventArgs e)
 {
     Modus = enumModus.Clear;
     SetEnable();
 }