예제 #1
0
        private void initCombo()
        {
            var branchCode = ((wcf_auth.GeneralUserProfile)SessionCheck.Check(Response, Session["userprofile"])).mAuthObjectValueList.FirstOrDefault(t => t.mAuthObjectName == "REGION").Value1;

            MasterBLBll           jenisBlBll = new MasterBLBll();
            CityIndexBll          cityBll    = new CityIndexBll();
            DdlBll                ddlBll     = new DdlBll();
            MasterKantorCabangBll cabangBll  = new MasterKantorCabangBll();

            var binalingComboData = jenisBlBll.GetDataActive();
            var cityComboData     = cityBll.GetDataByBranch(branchCode);

            cityComboData.DefaultView.Sort = "city_name ASC";

            var statusComboData = ddlBll.GetComboItem("ddl_status_binaling");
            var cabangCombo     = cabangBll.GetData(new Hashtable());

            ((GridViewDataComboBoxColumn)gvPermohonan.Columns["requestor_city_id"]).PropertiesComboBox.TextField  = "city_name";
            ((GridViewDataComboBoxColumn)gvPermohonan.Columns["requestor_city_id"]).PropertiesComboBox.ValueField = "city_appcode";
            ((GridViewDataComboBoxColumn)gvPermohonan.Columns["requestor_city_id"]).PropertiesComboBox.DataSource = cityComboData.DefaultView;

            ((GridViewDataComboBoxColumn)gvPermohonan.Columns["binaling_kind_id"]).PropertiesComboBox.TextField  = "name";
            ((GridViewDataComboBoxColumn)gvPermohonan.Columns["binaling_kind_id"]).PropertiesComboBox.ValueField = "id";
            ((GridViewDataComboBoxColumn)gvPermohonan.Columns["binaling_kind_id"]).PropertiesComboBox.DataSource = binalingComboData;

            ((GridViewDataComboBoxColumn)gvPermohonan.Columns["status"]).PropertiesComboBox.TextField  = "ddl_item";
            ((GridViewDataComboBoxColumn)gvPermohonan.Columns["status"]).PropertiesComboBox.ValueField = "ddl_value";
            ((GridViewDataComboBoxColumn)gvPermohonan.Columns["status"]).PropertiesComboBox.DataSource = statusComboData;


            ((GridViewDataComboBoxColumn)gvPermohonan.Columns["branch_code"]).PropertiesComboBox.TextField  = "branch_name";
            ((GridViewDataComboBoxColumn)gvPermohonan.Columns["branch_code"]).PropertiesComboBox.ValueField = "branch_code";
            ((GridViewDataComboBoxColumn)gvPermohonan.Columns["branch_code"]).PropertiesComboBox.DataSource = cabangCombo;
        }
예제 #2
0
        private void GetData()
        {
            var branchCode = ((wcf_auth.GeneralUserProfile)SessionCheck.Check(Response, Session["userprofile"])).mAuthObjectValueList.FirstOrDefault(t => t.mAuthObjectName == "REGION").Value1;

            gvPenerimaanProposal.DataSource = ((new PenerimaanProposalBll()).GetData(branchCode)).DefaultView;
            gvPenerimaanProposal.DataBind();
        }
예제 #3
0
        public void GetData()
        {
            var branchCode = ((wcf_auth.GeneralUserProfile)SessionCheck.Check(Response, Session["userprofile"])).mAuthObjectValueList.FirstOrDefault(t => t.mAuthObjectName == "REGION").Value1;

            gvPenilaianSurvey.DataSource = bll.getData(branchCode);
            gvPenilaianSurvey.DataBind();
        }
예제 #4
0
        private void initCombo()
        {
            var branchCode = ((wcf_auth.GeneralUserProfile)SessionCheck.Check(Response, Session["userprofile"])).mAuthObjectValueList.FirstOrDefault(t => t.mAuthObjectName == "REGION").Value1;
            MasterSektorKemitraanBll mitraBll = new MasterSektorKemitraanBll();
            DdlBll ddlBll = new DdlBll();
            MasterKantorCabangBll cabangBll = new MasterKantorCabangBll();
            CityIndexBll          cityBll   = new CityIndexBll();

            var identitasComboData       = ddlBll.GetComboItem("ddl_identity_type");
            var sektorKemitraanComboData = mitraBll.GetData(new Hashtable());
            var companyKindComboData     = ddlBll.getComboCompanyKind(new Hashtable());
            var supplierComboData        = ddlBll.getComboSupplier(branchCode.ToString());
            var cityComboData            = cityBll.GetDataByBranch(branchCode);
            var jenisKredit = ddlBll.getJenisKredit();

            ((GridViewDataComboBoxColumn)gvPenerimaanProposal.Columns["identification_type"]).PropertiesComboBox.TextField  = "ddl_item";
            ((GridViewDataComboBoxColumn)gvPenerimaanProposal.Columns["identification_type"]).PropertiesComboBox.ValueField = "ddl_value";
            ((GridViewDataComboBoxColumn)gvPenerimaanProposal.Columns["identification_type"]).PropertiesComboBox.DataSource = identitasComboData;
            ((GridViewDataComboBoxColumn)gvPenerimaanProposal.Columns["requestor_city_id"]).PropertiesComboBox.TextField    = "city_name";
            ((GridViewDataComboBoxColumn)gvPenerimaanProposal.Columns["requestor_city_id"]).PropertiesComboBox.ValueField   = "city_appcode";
            ((GridViewDataComboBoxColumn)gvPenerimaanProposal.Columns["requestor_city_id"]).PropertiesComboBox.DataSource   = cityComboData;

            ((GridViewDataComboBoxColumn)gvPenerimaanProposal.Columns["sector_id"]).PropertiesComboBox.TextField  = "sector_name";
            ((GridViewDataComboBoxColumn)gvPenerimaanProposal.Columns["sector_id"]).PropertiesComboBox.ValueField = "id";
            ((GridViewDataComboBoxColumn)gvPenerimaanProposal.Columns["sector_id"]).PropertiesComboBox.DataSource = sektorKemitraanComboData;

            ((GridViewDataComboBoxColumn)gvPenerimaanProposal.Columns["company_kind_id"]).PropertiesComboBox.TextField  = "description";
            ((GridViewDataComboBoxColumn)gvPenerimaanProposal.Columns["company_kind_id"]).PropertiesComboBox.ValueField = "id";
            ((GridViewDataComboBoxColumn)gvPenerimaanProposal.Columns["company_kind_id"]).PropertiesComboBox.DataSource = companyKindComboData;

            ((GridViewDataComboBoxColumn)gvPenerimaanProposal.Columns["supplier_id"]).PropertiesComboBox.TextField  = "supplier_name";
            ((GridViewDataComboBoxColumn)gvPenerimaanProposal.Columns["supplier_id"]).PropertiesComboBox.ValueField = "id";
            ((GridViewDataComboBoxColumn)gvPenerimaanProposal.Columns["supplier_id"]).PropertiesComboBox.DataSource = supplierComboData;
        }
예제 #5
0
        void gvBlPenilaian_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 branch     = gvBlPenilaian.GetRowValues(e.VisibleIndex, "branch_code").ToString();
                    var isApproved = gvBlPenilaian.GetRowValues(e.VisibleIndex, "approval_result").ToString();

                    if (userBranchCode == branch)
                    {
                        e.Visible = true;
                    }
                    else
                    {
                        e.Visible = false;
                    }

                    if (isApproved == "1")
                    {
                        e.Visible = false;
                    }
                    else
                    {
                        e.Visible = true;
                    }
                }
            }
            catch (Exception ex)
            {
            }
        }
        private void getData()
        {
            var branchCode = ((wcf_auth.GeneralUserProfile)SessionCheck.Check(Response, Session["userprofile"])).mAuthObjectValueList.FirstOrDefault(t => t.mAuthObjectName == "REGION").Value1;

            gvRescheduleKemitraan.DataSource = bll.getData(branchCode);
            gvRescheduleKemitraan.DataBind();
        }
예제 #7
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 supplier";
            log.UserName  = userName;

            try
            {
                var branchCode = ((wcf_auth.GeneralUserProfile)SessionCheck.Check(Response, Session["userprofile"])).mAuthObjectValueList.FirstOrDefault(t => t.mAuthObjectName == "REGION").Value1;
                gvPenyalur.DataSource = bll.getData(branchCode.ToString());
                gvPenyalur.DataBind();
                log.Type        = "S";
                log.Description = "get data supplier cabang " + branchCode.ToString() + " sukses";
            }
            catch (Exception Ex)
            {
                log.Type        = "E";
                log.Description = " get data supplier error :" + Ex.Message;
                ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('" + HttpUtility.JavaScriptStringEncode(log.Description) + "');", true);
            }
            finally {
                logBll.InsertActivity(log);
            }
        }
예제 #8
0
        private void getData()
        {
            var       branchCode = ((wcf_auth.GeneralUserProfile)SessionCheck.Check(Response, Session["userprofile"])).mAuthObjectValueList.FirstOrDefault(t => t.mAuthObjectName == "REGION").Value1;
            DataTable dt         = bll.getData(branchCode.ToString());

            gvMonitoring.DataSource = dt;
            gvMonitoring.DataBind();
        }
예제 #9
0
        private void GetData()
        {
            var branchCode = ((wcf_auth.GeneralUserProfile)SessionCheck.Check(Response, Session["userprofile"])).mAuthObjectValueList.FirstOrDefault(t => t.mAuthObjectName == "REGION").Value1;

            Session["penyalurandata"] = ((new PenyaluranBll()).GetDatas(branchCode));
            gvPenyaluran.DataSource   = (DataTable)Session["penyalurandata"];
            gvPenyaluran.DataBind();
        }
예제 #10
0
        private void GetData()
        {
            initCombo();
            var branchCode = ((wcf_auth.GeneralUserProfile)SessionCheck.Check(Response, Session["userprofile"])).mAuthObjectValueList.FirstOrDefault(t => t.mAuthObjectName == "REGION").Value1;

            gvPermohonan.DataSource = ((new PermohonanBll()).GetData(branchCode));
            gvPermohonan.DataBind();
        }
예제 #11
0
        private void GetData()
        {
            var branchCode = ((wcf_auth.GeneralUserProfile)SessionCheck.Check(Response, Session["userprofile"])).mAuthObjectValueList.FirstOrDefault(t => t.mAuthObjectName == "REGION").Value1;
            var data       = bll.GetDataPerwab(Convert.ToInt32(branchCode));

            gvPerwabPanjar.DataSource = data;
            gvPerwabPanjar.DataBind();
        }
예제 #12
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");
            }
        }
예제 #13
0
        private void initCombo()
        {
            var       branchCode = ((wcf_auth.GeneralUserProfile)SessionCheck.Check(Response, Session["userprofile"])).mAuthObjectValueList.FirstOrDefault(t => t.mAuthObjectName == "REGION").Value1;
            DataTable dt         = ddl.getRegionName(branchCode.ToString());

            ddlRegion.DataSource     = dt;
            ddlRegion.DataValueField = "branch_code";
            ddlRegion.DataTextField  = "branch_name";
            ddlRegion.DataBind();
        }
예제 #14
0
        private void GetData()
        {
            var branchCode = ((wcf_auth.GeneralUserProfile)SessionCheck.Check(Response, Session["userprofile"])).mAuthObjectValueList.FirstOrDefault(t => t.mAuthObjectName == "REGION").Value1;
            var data       = bll.GetData(Convert.ToInt32(branchCode));

            if (data.Rows.Count > 0)
            {
                txtVerifikasi.Text = data.Rows[0]["verifikasi"].ToString();
                txtPenyetuju.Text  = data.Rows[0]["penyetujuan"].ToString();
                txtPermintaan.Text = data.Rows[0]["permintaan_bayar"].ToString();
            }
        }
예제 #15
0
        protected void btnSubmit_Click(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    = "Persetujuan Panjar";
            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("@noPanajar-varchar-50", txtNoref.Text);
                ht.Add("@tglSetuju-varchar-20", DateTime.Parse(deTanggal.Text).ToString("dd/MM/yyyy"));
                ht.Add("@approved_amount-float", float.Parse(txtNilai.Text));
                ht.Add("@akunkas-varchar-40", cbbKasBank.Value.ToString());
                ht.Add("@akunpanjar-varchar-40", cbbPanjar.Value.ToString());
                ht.Add("@user-varchar-50", Session["user"].ToString());
                ht.Add("@branch_code-varchar-50", branchCode);

                bll.InsertPersetujuan(ht);

                log.Type        = "S";
                log.Description = log.Action + "Sukses oleh id" + ' ' + userName;
            }
            catch (Exception ex)
            {
                log.Type        = "E";
                log.Description = "Persetujuan Panjar Error : " + ex.Message;
            }
            finally
            {
                logBll.InsertActivity(log);

                if (log.Type == "S")
                {
                    Session["Panjar"] = "S";
                    Response.Redirect(Session["Url"].ToString());
                }
            }
        }
예제 #16
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");
            }
        }
예제 #17
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");
            }
        }
예제 #18
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();
        }
예제 #19
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;
        }
예제 #20
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;
        }
예제 #21
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");
            }
        }
예제 #22
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();
        }
예제 #23
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");
            }
        }
예제 #24
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;
        }
예제 #25
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;
        }
예제 #26
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);
            }
        }
예제 #27
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();
            }
        }
예제 #28
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);
            }
        }
예제 #29
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)
            {
            }
        }
예제 #30
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);
            }
        }