コード例 #1
0
        protected void btnTambah_Click(object sender, EventArgs e)
        {
            Pertamina.PKBL.BLL.ActivityLog    log    = new Pertamina.PKBL.BLL.ActivityLog();
            Pertamina.PKBL.BLL.ActivityLogBll logBll = new Pertamina.PKBL.BLL.ActivityLogBll();
            string host      = Request.UserHostName;
            string ipaddress = Request.UserHostAddress;
            string userName  = Session["user"].ToString();

            if (String.IsNullOrEmpty(ipaddress))
            {
                ipaddress = HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"];
            }
            log.HostName  = host;
            log.IPAddress = ipaddress;
            log.Action    = "Edit keterangan jurnal";
            log.UserName  = userName;

            try
            {
                Hashtable parameters = new Hashtable();

                var tgl = deTglBukti.Date.ToString("dd/MM/yyyy");

                parameters.Add("@nobukti-varchar-99", txtNoRef.Text.Trim());
                parameters.Add("@tglBukti-varchar-15", tgl);
                parameters.Add("@keteranganBayar-varchar-1000", txtKetBayar.Text);
                parameters.Add("@permintaanBayar-varchar-99", txtMintaBayar.Text);
                parameters.Add("@kepada-varchar-99", txtKepada.Text);
                parameters.Add("@verifikator-varchar-99", txtVerifikasi.Text);
                parameters.Add("@penyetuju-varchar-99", txtPenyetuju.Text);

                var jurnlaBll = new Pertamina.PKBL.BLL.Akuntansi.JurnalBll();

                jurnlaBll.EditKeterangan(parameters);

                GetData();
                ViewState["msg"] = "<font color=\"green\" size=\"8\"> Edit Berhasil </font>";



                log.Type        = "S";
                log.Description = log.Action + ' ' + "sukses oleh id " + ' ' + userName;
            }
            catch (Exception ex)
            {
                log.Type        = "E";
                log.Description = System.IO.Path.GetFileName(this.AppRelativeVirtualPath) + "Error " + ex.GetBaseException().Message;
            }
            finally
            {
                logBll.InsertActivity(log);
            }
        }
コード例 #2
0
        protected void gvDetailKas_RowUpdating(object sender, DevExpress.Web.Data.ASPxDataUpdatingEventArgs e)
        {
            Pertamina.PKBL.BLL.ActivityLog    log    = new Pertamina.PKBL.BLL.ActivityLog();
            Pertamina.PKBL.BLL.ActivityLogBll logBll = new Pertamina.PKBL.BLL.ActivityLogBll();
            string host      = Request.UserHostName;
            string ipaddress = Request.UserHostAddress;
            string userName  = Session["user"].ToString();

            if (String.IsNullOrEmpty(ipaddress))
            {
                ipaddress = HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"];
            }
            log.HostName  = host;
            log.IPAddress = ipaddress;
            log.Action    = "Edit deskripsi detail jurnal";
            log.UserName  = userName;

            try
            {
                var jurnlaBll = new Pertamina.PKBL.BLL.Akuntansi.JurnalBll();

                Hashtable parameters = new Hashtable();

                parameters.Add("@nobukti-varchar-99", Session["lihatjurnal"]);
                parameters.Add("@coa-varchar-20", e.NewValues["coa"]);
                parameters.Add("@ket-varchar-1000", e.NewValues["deskripsi"]);

                jurnlaBll.EditDetailKeterangan(parameters);

                GetData();

                e.Cancel = true;
                gvDetailKas.CancelEdit();

                log.Type        = "S";
                log.Description = log.Action + ' ' + "sukses oleh id " + ' ' + userName;
            }
            catch (Exception ex)
            {
                log.Type        = "E";
                log.Description = System.IO.Path.GetFileName(this.AppRelativeVirtualPath) + "Edit deskripsi detail jurnal ";
            }
            finally
            {
                logBll.InsertActivity(log);
            }
        }