Exemplo n.º 1
0
        private void roleAuth()
        {
            var  userRoles = ((wcf_auth.GeneralUserProfile)SessionCheck.Check(Response, Session["userprofile"])).mRoleList;
            bool insert    = RoleCheck.CheckRoleView(userRoles, "PK.Penilaian.Add");


            ((GridViewCommandColumn)gvPenilaianSurvey.Columns["opr"]).ShowNewButton = insert;


            if (!RoleCheck.CheckRoleView(userRoles, "PK.Penilaian.View"))
            {
                Response.Redirect("~/Default.aspx");
            }
        }
Exemplo n.º 2
0
        private void roleAuth()
        {
            var  userRoles = ((wcf_auth.GeneralUserProfile)SessionCheck.Check(Response, Session["userprofile"])).mRoleList;
            bool insert    = RoleCheck.CheckRoleView(userRoles, "ADM.PKBL.JenisKreditMitra.Add");
            bool edit      = RoleCheck.CheckRoleView(userRoles, "ADM.PKBL.JenisKreditMitra.Edit");
            bool delete    = RoleCheck.CheckRoleView(userRoles, "ADM.PKBL.JenisKreditMitra.Delete");

            ((GridViewCommandColumn)gvJenisKreditKemitraan.Columns["opr"]).ShowNewButtonInHeader = insert;
            ((GridViewCommandColumn)gvJenisKreditKemitraan.Columns["opr"]).ShowEditButton        = edit;
            ((GridViewCommandColumn)gvJenisKreditKemitraan.Columns["opr"]).ShowDeleteButton      = delete;
            if (!RoleCheck.CheckRoleView(userRoles, "ADM.PKBL.JenisKreditMitra.View"))
            {
                Response.Redirect("~/Default.aspx");
            }
        }
Exemplo n.º 3
0
        private void GetData()
        {
            var       branchCode = ((wcf_auth.GeneralUserProfile)SessionCheck.Check(Response, Session["userprofile"])).mAuthObjectValueList.FirstOrDefault(t => t.mAuthObjectName == "REGION").Value1;
            Hashtable ht         = new Hashtable();
            DataView  dv         = ((DataTable)bll.GetData(branchCode)).DefaultView;

            initCombo();

            if (ViewState["sort"] != null)
            {
                dv.Sort = ViewState["sort"].ToString();
            }
            gvBlPenilaian.DataSource = dv;
            gvBlPenilaian.DataBind();
        }
Exemplo n.º 4
0
        private void roleAuth()
        {
            var  userRoles = ((wcf_auth.GeneralUserProfile)SessionCheck.Check(Response, Session["userprofile"])).mRoleList;
            bool insert    = RoleCheck.CheckRoleView(userRoles, "PK.Penerimaan.Add");
            bool edit      = RoleCheck.CheckRoleView(userRoles, "PK.Penerimaan.Edit");
            bool delete    = RoleCheck.CheckRoleView(userRoles, "PK.Penerimaan.Delete");
            bool view      = RoleCheck.CheckRoleView(userRoles, "PK.Penerimaan.View");

            if (view == false)
            {
                Response.Redirect("~/Default.aspx");
            }

            ((GridViewCommandColumn)gvPenerimaanProposal.Columns["opr"]).ShowEditButton = edit;
        }
Exemplo n.º 5
0
        private void RoleAuth()
        {
            var userRoles = ((wcf_auth.GeneralUserProfile)SessionCheck.Check(Response, Session["userprofile"])).mRoleList;

            bool edit = (userRoles.FirstOrDefault(t => t.Contains("BL.Persetujuan.Edit")) != null) ? true : false;
            bool view = (userRoles.FirstOrDefault(t => t.Contains("BL.Persetujuan.View")) != null) ? true : false;

            if (view == false)
            {
                Response.Redirect("~/Default.aspx");
            }


            ((GridViewCommandColumn)gvPersetujuan.Columns["opr"]).ShowEditButton = edit;
        }
Exemplo n.º 6
0
        private void initCombo()
        {
            var branchCode = ((wcf_auth.GeneralUserProfile)SessionCheck.Check(Response, Session["userprofile"])).mAuthObjectValueList.FirstOrDefault(t => t.mAuthObjectName == "REGION").Value1;
            var akun       = bll.GetAkun(Convert.ToInt32(branchCode));
            var lawan      = bll.GetLawanAkun(Convert.ToInt32(Session["program"]));

            cbbKasBank.DataSource = akun;
            cbbKasBank.TextField  = "coa_display";
            cbbKasBank.ValueField = "account_id";
            cbbKasBank.DataBind();

            cbbPanjar.DataSource = lawan;
            cbbPanjar.TextField  = "coa_display";
            cbbPanjar.ValueField = "account_id";
            cbbPanjar.DataBind();
        }
Exemplo n.º 7
0
        //public void ValidateRole()
        //{
        //    var roles = ((wcf_auth.GeneralUserProfile)SessionCheck.Check(Response, Session["userprofile"])).mRoleList;
        //    var role = "ADM.PKBL.KotaKab.View";
        //    if (!RoleCheck.CheckRoleView(roles, role))
        //    {
        //        Response.Redirect("~/Default.aspx");
        //    }
        //}

        protected void RoleAuth()
        {
            var  userRoles = ((wcf_auth.GeneralUserProfile)SessionCheck.Check(Response, Session["userprofile"])).mRoleList;
            bool insert    = (userRoles.FirstOrDefault(t => t.Contains("ADM.PKBL.KotaKab.Add")) != null) ? true : false;
            bool edit      = (userRoles.FirstOrDefault(t => t.Contains("ADM.PKBL.KotaKab.Edit")) != null) ? true : false;
            bool delete    = (userRoles.FirstOrDefault(t => t.Contains("ADM.PKBL.KotaKab.Delete")) != null) ? true : false;
            bool view      = (userRoles.FirstOrDefault(t => t.Contains("ADM.PKBL.KotaKab.View")) != null) ? true : false;;

            ((GridViewCommandColumn)gvKota.Columns["opr"]).ShowNewButtonInHeader = insert;
            ((GridViewCommandColumn)gvKota.Columns["opr"]).ShowEditButton        = edit;
            ((GridViewCommandColumn)gvKota.Columns["opr"]).ShowDeleteButton      = delete;
            if (view == false)
            {
                Response.Redirect("~/Default.aspx");
            }
        }
Exemplo n.º 8
0
        private void roleAuth()
        {
            var  userRoles = ((wcf_auth.GeneralUserProfile)SessionCheck.Check(Response, Session["userprofile"])).mRoleList;
            bool insert    = RoleCheck.CheckRoleView(userRoles, "ADM.AKUN.NoAkun.Add");
            bool edit      = RoleCheck.CheckRoleView(userRoles, "ADM.AKUN.NoAkun.Edit");
            bool view      = RoleCheck.CheckRoleView(userRoles, "ADM.AKUN.NoAkun.View");
            bool delete    = RoleCheck.CheckRoleView(userRoles, "ADM.AKUN.NoAkun.Delete");

            if (view == false)
            {
                Response.Redirect("~/Default.aspx");
            }

            ((GridViewCommandColumn)gvNomorAkun.Columns["opr"]).ShowNewButtonInHeader = insert;
            ((GridViewCommandColumn)gvNomorAkun.Columns["opr"]).ShowEditButton        = edit;
        }
Exemplo n.º 9
0
        private void roleAuth()
        {
            var  userRoles = ((wcf_auth.GeneralUserProfile)SessionCheck.Check(Response, Session["userprofile"])).mRoleList;
            bool insert    = RoleCheck.CheckRoleView(userRoles, "PK.Persetujuan.Add");
            bool edit      = RoleCheck.CheckRoleView(userRoles, "PK.Persetujuan.Edit");
            bool view      = RoleCheck.CheckRoleView(userRoles, "PK.Persetujuan.View");

            ((GridViewCommandColumn)gvPersetujuanSurvey.Columns["opr"]).ShowNewButton = insert;
            //((GridViewCommandColumn)gvPersetujuanSurvey.Columns["Opr."]).sho = edit;


            if (view == false)
            {
                Response.Redirect("~/Default.aspx");
            }
        }
Exemplo n.º 10
0
        private void roleAuth()
        {
            var  userRoles = ((wcf_auth.GeneralUserProfile)SessionCheck.Check(Response, Session["userprofile"])).mRoleList;
            bool view      = RoleCheck.CheckRoleView(userRoles, "AKUN.TransferDanaBank.View");

            //((GridViewCommandColumn)gvPermohonan.Columns["opr"]).ShowNewButton = insert;
            //((GridViewCommandColumn)gvBankCOA.Columns["Opr."]).ShowEditButton = edit;
            // ((GridViewDataColumn)gvPenyaluran.Columns["Opr."]).ShowEditButton = edit;



            //btnSubmit.Visible = insert;

            if (view == false)
            {
                Response.Redirect("~/Default.aspx");
            }
            //btnSubmit.Visible = insert;
        }
Exemplo n.º 11
0
        protected void btnSubmit_Click1(object sender, EventArgs e)
        {
            ActivityLog    log       = new ActivityLog();
            ActivityLogBll logBll    = new 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    = "Insert";
            log.UserName  = userName;

            try
            {
                Hashtable ht         = new Hashtable();
                var       branchCode = ((wcf_auth.GeneralUserProfile)SessionCheck.Check(Response, Session["userprofile"])).mAuthObjectValueList.FirstOrDefault(t => t.mAuthObjectName == "REGION").Value1;
                ht.Add("@branch_code-int", branchCode);
                ht.Add("@permintaan_bayar-varchar-99", txtPermintaan.Text);
                ht.Add("@penyetujuan-varchar-99", txtPenyetuju.Text);
                ht.Add("@verifikasi-varchar-99", txtVerifikasi.Text);
                ht.Add("@user-varchar-50", Session["user"]);
                bll.InsertData(ht);
                log.Type        = "S";
                log.Description = log.Action + ' ' + "sukses oleh id " + ' ' + userName;

                GetData();
            }
            catch (Exception ex)
            {
                log.Type        = "E";
                log.Description = "Insert Error";
            }
            finally
            {
                logBll.InsertActivity(log);
            }
        }
Exemplo n.º 12
0
        private void GetData()
        {
            var    branchCode = ((wcf_auth.GeneralUserProfile)SessionCheck.Check(Response, Session["userprofile"])).mAuthObjectValueList.FirstOrDefault(t => t.mAuthObjectName == "REGION").Value1;
            string Nopanjar   = Session["Nopanjar"].ToString();
            var    data       = bll.GetDataPersetujuan(Convert.ToInt32(branchCode), Nopanjar);

            if (data.Rows.Count > 0)
            {
                lblTerima.Text    = String.Format("Sudah terima dari, {0}", data.Rows[0]["Nama"].ToString());
                lblBanyaknya.Text = String.Format("Banyaknya {0} Rupiah", Helper.Terbilang(Convert.ToInt32(data.Rows[0]["NilaiPanjar"])));
                lblJumlah.Text    = String.Format("Jumlah Rp{0:#,##}.00", Convert.ToInt32(data.Rows[0]["NilaiPanjar"].ToString()));

                lblTanggal.Text = String.Format(",{0}", DateTime.Today.ToString("dd MMMM yyyy"));
                deTanggal.Date  = DateTime.Parse(data.Rows[0]["TglPanjar"].ToString());
                txtNoref.Text   = data.Rows[0]["Nopanjar"].ToString();
                txtNIP.Text     = data.Rows[0]["nip"].ToString();
                txtNilai.Text   = Convert.ToInt32(data.Rows[0]["NilaiPanjar"]).ToString();
                txtNama.Text    = data.Rows[0]["Nama"].ToString();
            }
        }
Exemplo n.º 13
0
        private void getData()
        {
            ActivityLog    log       = new ActivityLog();
            ActivityLogBll logBll    = new 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    = "get data jadwal supplier";
            log.UserName  = userName;



            try
            {
                var       branchCode = ((wcf_auth.GeneralUserProfile)SessionCheck.Check(Response, Session["userprofile"])).mAuthObjectValueList.FirstOrDefault(t => t.mAuthObjectName == "REGION").Value1;
                DataTable dt         = bll.getData(branchCode.ToString());
                gvJadwalPembayaran.DataSource = dt;
                gvJadwalPembayaran.DataBind();

                log.Type        = "S";
                log.Description = "get data jadwal pembayaran sukses";
            }
            catch (Exception ex)
            {
                log.Type        = "E";
                log.Description = "get data jadwal pembayaran error :" + ex.Message;
            }
            finally {
                logBll.InsertActivity(log);
            }
        }
Exemplo n.º 14
0
        void gvPermohonan_CommandButtonInitialize(object sender, ASPxGridViewCommandButtonEventArgs e)
        {
            try
            {
                if (e.ButtonType == ColumnCommandButtonType.Edit)
                {
                    var userBranchCode = ((wcf_auth.GeneralUserProfile)SessionCheck.Check(Response, Session["userprofile"])).mAuthObjectValueList.FirstOrDefault(t => t.mAuthObjectName == "REGION").Value1;

                    var data      = gvPermohonan.GetRowValues(e.VisibleIndex, "branch_code").ToString();
                    var appstatus = gvPermohonan.GetRowValues(e.VisibleIndex, "status").ToString();
                    if (userBranchCode == data && appstatus != "5")
                    {
                        e.Visible = true;
                    }
                    else
                    {
                        e.Visible = false;
                    }
                }
            }
            catch (Exception ex)
            {
            }
        }
Exemplo n.º 15
0
        protected void gvPermohonan_RowInserting(object sender, DevExpress.Web.Data.ASPxDataInsertingEventArgs e)
        {
            ActivityLog    log       = new ActivityLog();
            ActivityLogBll logBll    = new 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    = "Insert Permohonan";
            log.UserName  = userName;

            try
            {
                var accDate   = DateTime.Parse(e.NewValues["proposal_accept_date"].ToString());
                var regisDate = DateTime.Parse(e.NewValues["registration_date"].ToString());

                var userBranchCode = ((wcf_auth.GeneralUserProfile)SessionCheck.Check(Response, Session["userprofile"])).mAuthObjectValueList.FirstOrDefault(t => t.mAuthObjectName.Contains("REGION")).Value1;

                Hashtable ht         = new Hashtable();
                string    created_by = Session["user"].ToString();
                ht.Add("@proposal_number-varchar-99", e.NewValues["proposal_number"] ?? "");
                ht.Add("@proposal_accept_date-varchar-30", accDate.ToString("dd/MM/yyyy"));
                ht.Add("@registration_date-varchar-30", regisDate.ToString("dd/MM/yyyy"));

                ht.Add("@requestor_company-varchar-200", e.NewValues["requestor_company"] ?? "");
                ht.Add("@requestor_name-varchar-200", e.NewValues["requestor_name"] ?? "");
                ht.Add("@requestor_address-varchar-512", e.NewValues["requestor_address"] ?? "");
                ht.Add("@requestor_district-varchar-200", e.NewValues["requestor_district"] ?? "");
                ht.Add("@requestor_city_id-varchar-5", e.NewValues["requestor_city_id"] ?? "");
                ht.Add("@requestor_postal-varchar-9", e.NewValues["requestor_postal"] ?? "");
                ht.Add("@requestor_phone1-varchar-100", e.NewValues["requestor_phone1"] ?? "");
                ht.Add("@requestor_phone2-varchar-100", e.NewValues["requestor_phone2"] ?? "");
                ht.Add("@requestor_email-varchar-100", e.NewValues["requestor_email"] ?? "");

                ht.Add("@proposal_title-varchar-200", e.NewValues["proposal_title"] ?? "");
                ht.Add("@activity_descr-varchar-512", e.NewValues["activity_descr"] ?? "");
                ht.Add("@binaling_kind_id-int", e.NewValues["binaling_kind_id"] ?? "");
                ht.Add("@requested_amount-decimal", e.NewValues["requested_amount"] ?? "");
                ht.Add("@created_by-varchar-99", created_by.ToString());

                ht.Add("@branch_code-int", userBranchCode);

                Session["idPermohonan"] = bll.InsertData(ht);
                log.Type        = "S";
                log.Description = log.Action + "Sukses oleh id" + ' ' + userName;
                e.Cancel        = true;
                gvPermohonan.CancelEdit();
                DevExpress.Web.ASPxClasses.ASPxWebControl.RedirectOnCallback("CheckList.aspx");
                //GetData();
            }
            catch (Exception ex)
            {
                log.Type        = "E";
                log.Description = "Insert Error : " + ex.Message;
            }
            finally
            {
                logBll.InsertActivity(log);
            }
        }