public void HakAkses()
    {
        if (Session["userid"] is object)
        {
            userid = Session["userid"].ToString();

            if (Session["groups"] is object)
            {
                groups = Session["groups"].ToString();

            }

        }

        if (!(Session["userid"] is object))
        {
            Response.Write("<script language=\"javascript\" type=\"text/javascript\">");
            Response.Write("alert('Session sudah habis. Silakan login kembali.');");
            Response.Write("location.href = '../login.aspx';");
            Response.Write("</script>");
        }

        LANDCOMP.ExecuteSTP eSTP = new LANDCOMP.ExecuteSTP();
        eSTP.Datas();
        DataSet ds = new DataSet();
        ds = eSTP.List8("P_MENU", "CHA", "", groups, "", "", "", "", "");
        dt = ds.Tables[0];

        PraRegistrasiView = dt.Rows[0]["PraRegistrasi"].ToString(); //0
        PraRegistrasiEdit = dt.Rows[0]["PraRegistrasiEdit"].ToString(); //1
        PraRegistrasiDelete = dt.Rows[0]["PraRegistrasiDelete"].ToString(); //2
        PraRegistrasiAssign = dt.Rows[0]["PraRegistrasiAssign"].ToString(); //3

        dt.Dispose();

        if (PraRegistrasiView.ToString() != "1" )
        {
            if (groups.ToString() != "1")
            {

                Response.Write("<script language=\"javascript\" type=\"text/javascript\">");
                //Response.Write("window.location.reload()");
                Response.Write("alert('Anda Tidak Memiliki Akses Untuk Melihat Modul Ini');");
                Response.Write("location.href = 'home.aspx';");
                Response.Write("</script>");
            }
        }
    }
    private void HakAkses()
    {
        if (Session["userid"] is object)
        {
            userid = Session["userid"].ToString();

            if (Session["groups"] is object)
            {
                groups = Session["groups"].ToString();

            }

        }

        LANDCOMP.ExecuteSTP eSTP = new LANDCOMP.ExecuteSTP();
        eSTP.Datas();
        DataSet ds = new DataSet();

        ds = eSTP.List8("P_MENU", "CHA", "", groups, "", "", "", "", "");

        dt = ds.Tables[0];

        MasterPerusahaanEdit = dt.Rows[12]["MasterPerusahaanEdit"].ToString(); //0
        MasterPerusahaanDelete = dt.Rows[12]["MasterPerusahaanDelete"].ToString(); //1
        MasterPerusahaanView = dt.Rows[12]["MasterPerusahaan"].ToString(); //2
        MasterPerusahaanAssign = dt.Rows[12]["MasterPerusahaanAssign"].ToString(); //3

        dt.Dispose();

        if (MasterPerusahaanView.ToString() != "1")
        {
            if (groups.ToString() != "1")
            {
                Response.Write("<script language=\"javascript\" type=\"text/javascript\">");
                Response.Write("alert('Anda Tidak Memiliki Akses Untuk Melihat Modul Ini');");
                Response.Write("location.href = 'home.aspx';");
                Response.Write("</script>");
            }
        }
    }
    public void HakAkses()
    {
        if (Session["userid"] is object)
        {
            userid = Session["userid"].ToString();

            if (Session["groups"] is object)
            {
                groups = Session["groups"].ToString();

            }

        }

        if (!(Session["userid"] is object))
        {
            Response.Write("<script language=\"javascript\" type=\"text/javascript\">");
            Response.Write("alert('Session sudah habis. Silakan login kembali.');");
            Response.Write("location.href = '../login.aspx';");
            Response.Write("</script>");
        }

        LANDCOMP.ExecuteSTP eSTP = new LANDCOMP.ExecuteSTP();
        eSTP.Datas();
        DataSet ds = new DataSet();

        var Param1 = "";

        bool cek = true;
        if (cek && (Request.Params["param1"] is object))
        {
            Param1 = Request.Params["param1"].ToString();
        }
        else
        {
            Param1 = "";
        }

        ds = eSTP.List8("P_MENU", "CHA", "", groups, "", "", "", "", "");
        dt = ds.Tables[0];

        MasterIdentitasView = dt.Rows[11]["MasterIdentitas"].ToString(); //0
        MasterIdentitasEdit = dt.Rows[11]["MasterIdentitasEdit"].ToString(); //1
        MasterIdentitasDelete = dt.Rows[11]["MasterIdentitasDelete"].ToString(); //2
        MasterIdentitasAssign = dt.Rows[11]["MasterIdentitasAssign"].ToString(); //3

        dt.Dispose();

        if (Param1 == "")
        {
            if (MasterIdentitasView.ToString() != "1")
            {
                if (groups.ToString() != "1")
                {
                    Response.Write("<script language=\"javascript\" type=\"text/javascript\">");
                    Response.Write("alert('Anda Tidak Memiliki Akses Untuk Menambah Di Modul Ini');");
                    Response.Write("location.href = 'home.aspx';");
                    Response.Write("</script>");
                }
            }
        }

        else if (Param1 == "F")
        {
            if (MasterIdentitasView.ToString() != "1")
            {
                if (groups.ToString() != "1")
                {
                    Response.Write("<script language=\"javascript\" type=\"text/javascript\">");
                    Response.Write("alert('Anda Tidak Memiliki Akses Untuk Melihat Di Modul Ini');");
                    Response.Write("location.href = 'home.aspx';");
                    Response.Write("</script>");
                }
            }
        }

        else if (Param1 == "E")
        {
            if (MasterIdentitasEdit.ToString() != "1")
            {
                if (groups.ToString() != "1")
                {
                    Response.Write("<script language=\"javascript\" type=\"text/javascript\">");
                    Response.Write("alert('Anda Tidak Memiliki Akses Untuk Edit Di Modul Ini');");
                    Response.Write("location.href = 'home.aspx';");
                    Response.Write("</script>");
                }
            }
        }

        else if (Param1.ToString() == "D")
        {
            if (MasterIdentitasDelete.ToString() != "1")
            {
                if (groups.ToString() != "1")
                {
                    Response.Write("<script language=\"javascript\" type=\"text/javascript\">");
                    Response.Write("alert('Anda Tidak Memiliki Akses Untuk Delete Di Modul Ini');");
                    Response.Write("location.href = 'home.aspx';");
                    Response.Write("</script>");
                }
            }
        }

        else if (Param1.ToString() == "I")
        {
            if (MasterIdentitasAssign.ToString() != "1")
            {
                if (groups.ToString() != "1")
                {
                    Response.Write("<script language=\"javascript\" type=\"text/javascript\">");
                    Response.Write("alert('Anda Tidak Memiliki Akses Untuk Menambah Di Modul Ini');");
                    Response.Write("location.href = 'home.aspx';");
                    Response.Write("</script>");
                }
            }
        }
        else
        {
            Response.Write("<script language=\"javascript\" type=\"text/javascript\">");
            Response.Write("alert('Aksi Yang Anda Cari Tidak Ditemukan');");
            Response.Write("location.href = 'home.aspx';");
            Response.Write("</script>");
        }
    }
示例#4
0
    private bool ServiceSelect(string sm)
    {
        switch (sm)
        {
            case "L":

                var param1L = Request.Params["param1"].ToString();
                var param2L = Request.Params["param2"].ToString();
                var param4L = Request.Params["param4"].ToString();
                LANDCOMP.ExecuteSTP eSTP_L = new LANDCOMP.ExecuteSTP();
                eSTP_L.Datas();
                DataSet ds_L = new DataSet();
                ds_L = eSTP_L.List8("P_VISUMS_D", param1L, param2L, "", param4L, "", "", "", "");
                dt = ds_L.Tables[0];
                Response.ContentType = "application/xhtml+xml";
                Response.Write("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
                Response.Write("<rows>");

                    if (param1L == "LRK")
                    {
                        for (int i = 0; i < dt.Rows.Count; i++)
                        {
                            Random r = new Random();
                            Response.Write("<row id=\"" + (i + 1).ToString() + "\">");
                            Response.Write("<cell>" + (i + 1).ToString() + "</cell>");
                            Response.Write("<cell>" + RemoveWhiteSpace(dt.Rows[i]["visumsCodess"].ToString()) + "</cell>");
                            Response.Write("<cell>" + RemoveWhiteSpace(dt.Rows[i]["visumsKtrgn"].ToString()) + "</cell>");
                            Response.Write("<cell>" + RemoveWhiteSpace(dt.Rows[i]["visumsRekom"].ToString()) + "</cell>");
                            Response.Write("<cell>" + RemoveWhiteSpace(dt.Rows[i]["visumsAksi"].ToString()) + "</cell>");
                            Response.Write("<cell>" + RemoveWhiteSpace(dt.Rows[i]["visumsSequen"].ToString()) + "</cell>");
                            Response.Write("</row>");
                        }
                    }

                    else
                    {
                        for (int i = 0; i < dt.Rows.Count; i++)
                        {
                            Random r = new Random();
                            Response.Write("<row id=\"" + (i + 1).ToString() + "\">");
                            Response.Write("<cell>" + (i + 1).ToString() + "</cell>");
                            Response.Write("<cell>" + RemoveWhiteSpace(dt.Rows[i]["visumsCodess"].ToString()) + "</cell>");
                            Response.Write("<cell>" + RemoveWhiteSpace(dt.Rows[i]["visumsKtrgn"].ToString()) + "</cell>");
                            Response.Write("<cell>" + RemoveWhiteSpace("Hapus^javascript:Hapus(\"" + "DO" + "\",\"" + "DO" + "\",\"" + dt.Rows[i]["visumsNovism"].ToString() + "\",\"" + dt.Rows[i]["visumsSequen"].ToString() + "\",\"" + "\");^_self") + "</cell>");
                            Response.Write("</row>");
                        }
                    }
                Response.Write("</rows>");
                dt.Dispose();
                Response.End();
                Response.End();

                return false;

            case "V":

                var Param1 = Request.Params["param1"].ToString();
                var Param2 = Request.Params["param2"].ToString();
                LANDCOMP.ExecuteSTP eSTP = new LANDCOMP.ExecuteSTP();
                eSTP.Datas();
                DataSet ds = new DataSet();
                ds = eSTP.List11("P_VISUMS", Param1, Param2, "", "", "", "", "", "", "", "", "");

                dt = ds.Tables[0];

                Response.ContentType = "text/plain";
                Response.Write(dt.Rows[0]["visumsNovism"].ToString() + "|"); //0
                Response.Write(dt.Rows[0]["registNmrReg"].ToString() + "|"); //1
                Response.Write(dt.Rows[0]["pengtoNmrPid"].ToString() + "|"); //2
                Response.Write(dt.Rows[0]["visumsVerLnj"].ToString() + "|"); //3
                Response.Write(dt.Rows[0]["visumsEkseps"].ToString() + "|"); //4
                Response.Write(dt.Rows[0]["VisumsKetEks"].ToString() + "|"); //5
                dt.Dispose();

                Response.End();
                Response.End();
                return false;

            case "CRUD":
                Response.ContentType = "text/plain";
                Response.Write(Save());
                Response.End();
                return false;

            case "CRUDOS":
                Response.ContentType = "text/plain";
                Response.Write(SaveOS());
                Response.End();
                return false;

            default:
                Response.ContentType = "text/plain";
                Response.End();
                return true;
        }
    }
示例#5
0
    private bool ServiceSelect(string sm)
    {
        switch (sm)
        {
            case "HA":

                if (Session["userid"] is object)
                {
                    userid = Session["userid"].ToString();

                }

                //Response.ContentType = "text/plain";
                var param1 = Request.Params["param1"].ToString();
                var param2 = Request.Params["param2"].ToString();
                var param3 = Request.Params["param3"].ToString();
                var param4 = Request.Params["param4"].ToString();
                var param5 = Request.Params["param5"].ToString();
                var param6 = Request.Params["param6"].ToString();
                var param7 = Session["userid"].ToString();
                var param8 = Request.Params["param8"].ToString();

                LANDCOMP.ExecuteSTP eSTP = new LANDCOMP.ExecuteSTP();
                eSTP.Datas();
                //DataSet ds = new DataSet();
                eSTP.save8("P_MENU", param1, param2, param3, param4, param5, param6, userid, param8);
                //Response.End();
                return false;

            case "L":

                var param1L = Request.Params["param1"].ToString();
                var param2L = Request.Params["param2"].ToString();
                var param3L = Request.Params["param3"].ToString();

                LANDCOMP.ExecuteSTP eSTP_L = new LANDCOMP.ExecuteSTP();
                eSTP_L.Datas();
                DataSet ds_L = new DataSet();
                ds_L = eSTP_L.List8("P_MENU", param1L, param2L, param3L, "", "", "", "", "");

                dt = ds_L.Tables[0];

                Response.ContentType = "application/xhtml+xml";
                Response.Write("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
                Response.Write("<rows>");

                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    Random r = new Random();
                    Response.Write("<row id=\"" + (i + 1).ToString() + "\">");
                    Response.Write("<cell>" + (i + 1).ToString() + "</cell>"); // Untuk Membuat Angka
                    Response.Write("<cell>" + RemoveWhiteSpace(dt.Rows[i]["Modul"].ToString()) + "</cell>");

                    Response.Write("<cell>" + RemoveWhiteSpace(dt.Rows[i]["Ad"].ToString()) + "</cell>");
                    Response.Write("<cell>" + RemoveWhiteSpace(dt.Rows[i]["Edit"].ToString()) + "</cell>");
                    Response.Write("<cell>" + RemoveWhiteSpace(dt.Rows[i]["Delet"].ToString()) + "</cell>");
                    Response.Write("<cell>" + RemoveWhiteSpace(dt.Rows[i]["Vie"].ToString()) + "</cell>");
                    Response.Write("<cell>" + RemoveWhiteSpace(dt.Rows[i]["Prin"].ToString()) + "</cell>");
                    //Response.Write("<cell>" + RemoveWhiteSpace(dt.Rows[i]["negosiSepakt"].ToString()) + "</cell>");
                    //Response.Write("<cell>" + RemoveWhiteSpace("View^NegosiasiForm.aspx?rand=" + r.Next() + "&param1=V" + "&param2=" + dt.Rows[i]["registNmrReg"].ToString() + "") + "</cell>");
                    //if (dt.Rows[i]["negosiNmrNeg"].ToString() != "")
                    //{

                    //    Response.Write("<cell>" + RemoveWhiteSpace("Edit^NegosiasiForm.aspx?rand=" + r.Next() + "&param1=E" + "&param2=" + dt.Rows[i]["registNmrReg"].ToString() + "") + "</cell>");
                    //    Response.Write("<cell>" + RemoveWhiteSpace("Delete^NegosiasiForm.aspx?rand=" + r.Next() + "&param1=D" + "&param2=" + dt.Rows[i]["registNmrReg"].ToString() + "") + "</cell>");
                    //}
                    Response.Write("</row>");
                }
                Response.Write("</rows>");
                dt.Dispose();
                Response.End();
                Response.End();

                return false;

            default:
                Response.ContentType = "text/plain";
                Response.End();
                return true;
        }
    }
    private bool ServiceSelect(string sm)
    {
        switch (sm)
        {
            case "V":

                var param1 = Request.Params["param1"].ToString();
                var param2 = Request.Params["param2"].ToString();

                LANDCOMP.ExecuteSTP eSTP = new LANDCOMP.ExecuteSTP();
                eSTP.Datas();
                DataSet ds = new DataSet();
                ds = eSTP.List8("P_USERSS", param1, param2, "", "", "", "", "", "");
                dt = ds.Tables[0];

                Response.ContentType = "text/plain";
                Response.Write(dt.Rows[0]["UserssIDents"].ToString() + "|"); //0
                //Response.Write(dt.Rows[0]["UserssPasswd"].ToString() + "|"); //1
                Response.Write(dt.Rows[0]["UserssNamess"].ToString() + "|"); //2
                Response.Write(dt.Rows[0]["UserssGroups"].ToString() + "|"); //3
                Response.Write(dt.Rows[0]["UserrsActive"].ToString() + "|"); //4

                dt.Dispose();

                Response.End();
                Response.End();
                return false;

            case "CRUD":
                Response.ContentType = "text/plain";
                Response.Write(Save());
                Response.End();
                return false;

            default:
                Response.ContentType = "text/plain";
                Response.End();
                return true;
        }
    }
    private String Save()
    {
        if (Session["userid"] is object)
        {
            userid = Session["userid"].ToString();

        }

        String param1 = ""; if (Request.Params["param1"] is object) param1 = Request.Params["param1"].ToString();
        String param2 = ""; if (Request.Params["param2"] is object) param2 = Request.Params["param2"].ToString();
        String param3 = ""; if (Request.Params["param3"] is object) param3 = Request.Params["param3"].ToString();
        String param4 = ""; if (Request.Params["param4"] is object) param4 = Request.Params["param4"].ToString();
        String param5 = ""; if (Request.Params["param5"] is object) param5 = Request.Params["param5"].ToString();
        String param6 = ""; if (Request.Params["param6"] is object) param6 = Request.Params["param6"].ToString();
        String param7 = ""; if (Request.Params["param7"] is object) param7 = Request.Params["param7"].ToString();
        String param8 = ""; if (Request.Params["param8"] is object) param8 = Request.Params["param8"].ToString();
        //String sql = "";
        String output = "";

        try
        {
            output = param1;

            if (output == "E" )
            {
                LANDCOMP.ExecuteSTP eSTP = new LANDCOMP.ExecuteSTP();
                eSTP.Datas();
                DataSet ds = new DataSet();
                ds = eSTP.List8("P_USERSS", "X", param2, param8, "", "", "", "", "");
                dt = ds.Tables[0];

                if (dt.Rows.Count > 0)
                {

                        eSTP.Datas();
                        eSTP.save8("P_USERSS", param1, param2, param3, param4, param5, param6, userid, "");
                        return output;

                }
                output = "noedit";
                return output;
            }

            if (output == "D" || output == "I")
            {

                LANDCOMP.ExecuteSTP eSTP = new LANDCOMP.ExecuteSTP();
                eSTP.Datas();
                eSTP.save8("P_USERSS", param1, param2, param3, param4, param5, param6, userid, param8);
                return output;

            }

        }
        catch (Exception ex)
        {
            Response.Write(ex.Message);
            Response.End();
            return ex.Message;
        }

        return output;
    }
    private void HakAkses()
    {
        //Response.ContentType = "text/plain";

        LANDCOMP.ExecuteSTP eSTP = new LANDCOMP.ExecuteSTP();
        eSTP.Datas();
        DataSet ds = new DataSet();

        ds = eSTP.List8("P_MENU", "CHA", "", groups, "", "", "", "", "");

        dt = ds.Tables[0];

        //Response.ContentType = "text/plain";

        praregistrasi = dt.Rows[0]["PraRegistrasi"].ToString(); //0
        PengecekanLapangan = dt.Rows[1]["PengecekanLapangan"].ToString(); //1
        Registrasi = dt.Rows[2]["Registrasi"].ToString(); //2
        PengukuranT0 = dt.Rows[5]["PengukuranT0"].ToString(); //3
        Verifikasi = dt.Rows[4]["Verifikasi"].ToString(); //4
        Negosiasi = dt.Rows[3]["Negosiasi"].ToString(); //5
        Pemberkasan = dt.Rows[6]["Pemberkasan"].ToString(); //6
        Pembayaran = dt.Rows[7]["Pembayaran"].ToString(); //7
        Finalisasi = dt.Rows[8]["Finalisasi"].ToString(); //8
        GroupManagement = dt.Rows[9]["GroupManagement"].ToString(); //9
        UserManagement = dt.Rows[10]["UserManagement"].ToString(); //10
        MasterIdentitas = dt.Rows[11]["MasterIdentitas"].ToString(); //11
        MasterPerusahaan = dt.Rows[12]["MasterPerusahaan"].ToString(); //12
        MasterCodes = dt.Rows[13]["MasterCodes"].ToString(); //13
        MasterMenu = dt.Rows[14]["MasterMenu"].ToString(); //14
        SerahTerimaBerkas = dt.Rows[15]["SerahTerimaBerkas"].ToString(); //15
        TopPriority = dt.Rows[16]["TopPriority"].ToString(); //16
        FiveYears = dt.Rows[17]["FiveYears"].ToString(); //17
        LOM = dt.Rows[18]["LOM"].ToString(); //18
        Other = dt.Rows[19]["Other"].ToString(); //19
        ReportPraRegistrasi = dt.Rows[0]["ReportPraRegistrasi"].ToString(); //20
        ReportPengecekanLapangan = dt.Rows[1]["ReportPengecekanLapangan"].ToString(); //21
        ReportRegistrasi = dt.Rows[2]["ReportRegistrasi"].ToString(); //22
        ReportPengukuranT0 = dt.Rows[3]["ReportPengukuranT0"].ToString(); //23
        ReportNegosiasi = dt.Rows[5]["ReportNegosiasi"].ToString(); //24
        ReportVerifikasi = dt.Rows[4]["ReportVerifikasi"].ToString(); //25
        ReportFinalisasi = dt.Rows[8]["ReportFinalisasi"].ToString(); //26

        //Response.Write("<script language=\"javascript\" type=\"text/javascript\">");
        //Response.Write("alert('Viky Ganteng');" + ReportFinalisasi);
        //Response.Write("</script>");

        dt.Dispose();

        //Response.End();
    }
    private bool ServiceSelect(string sm)
    {
        switch (sm)
        {
            case "L":

                var param1L = Request.Params["param1"].ToString();
                LANDCOMP.ExecuteSTP eSTP_L = new LANDCOMP.ExecuteSTP();
                eSTP_L.Datas();
                DataSet ds_L = new DataSet();
                ds_L = eSTP_L.List8("P_USERSS", param1L, "", "", "", "", "", "", "");

                dt = ds_L.Tables[0];

                Response.ContentType = "application/xhtml+xml";
                Response.Write("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
                Response.Write("<rows>");

                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    Random r = new Random();
                    Response.Write("<row id=\"" + (i + 1).ToString() + "\">");
                    //Response.Write("<cell>" + (i + 1).ToString() + "</cell>"); // Untuk Membuat Angka
                    Response.Write("<cell>" + RemoveWhiteSpace(dt.Rows[i]["UserssIDents"].ToString()) + "</cell>");
                    Response.Write("<cell>" + RemoveWhiteSpace(dt.Rows[i]["UserssNamess"].ToString()) + "</cell>");
                    Response.Write("<cell>" + RemoveWhiteSpace(dt.Rows[i]["UserssGroups"].ToString()) + "</cell>");
                    Response.Write("<cell>" + RemoveWhiteSpace(dt.Rows[i]["UserrsActive"].ToString()) + "</cell>");

                    if (groups.ToString() == "1")
                    {

                        Response.Write("<cell>" + RemoveWhiteSpace("View^UserManagementForm.aspx?rand=" + r.Next() + "&param1=V" + "&param2=" + dt.Rows[i]["UserssIDents"].ToString() + "") + "</cell>");
                        Response.Write("<cell>" + RemoveWhiteSpace("Edit^UserManagementForm.aspx?rand=" + r.Next() + "&param1=E" + "&param2=" + dt.Rows[i]["UserssIDents"].ToString() + "") + "</cell>");
                        Response.Write("<cell>" + RemoveWhiteSpace("Delete^UserManagementForm.aspx?rand=" + r.Next() + "&param1=D" + "&param2=" + dt.Rows[i]["UserssIDents"].ToString() + "") + "</cell>");
                    }

                    else
                    {
                        if (UserManagementView.ToString() == "1")
                        {
                            Response.Write("<cell>" + RemoveWhiteSpace("View^UserManagementForm.aspx?rand=" + r.Next() + "&param1=V" + "&param2=" + dt.Rows[i]["UserssIDents"].ToString() + "") + "</cell>");
                        }
                        if (UserManagementEdit.ToString() == "1")
                        {
                            Response.Write("<cell>" + RemoveWhiteSpace("Edit^UserManagementForm.aspx?rand=" + r.Next() + "&param1=E" + "&param2=" + dt.Rows[i]["UserssIDents"].ToString() + "") + "</cell>");
                        }
                        if (UserManagementDelete.ToString() == "1")
                        {
                            Response.Write("<cell>" + RemoveWhiteSpace("Delete^UserManagementForm.aspx?rand=" + r.Next() + "&param1=D" + "&param2=" + dt.Rows[i]["UserssIDents"].ToString() + "") + "</cell>");

                        }
                    }

                    Response.Write("</row>");
                }
                Response.Write("</rows>");
                dt.Dispose();

                Response.End();
                Response.End();

                return false;

            default:
                Response.ContentType = "text/plain";
                Response.End();
                return true;
        }
    }