private String Delete()
    {
        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 param9 = ""; if (Request.Params["param9"] is object) param8 = Request.Params["param9"].ToString();

        String sql = "";
        String output = "";

        try
        {

            output = param1;

            if (output == "I" || output == "E" || output == "D")
            {
                LANDCOMP.ExecuteSTP eSTP = new LANDCOMP.ExecuteSTP();
                eSTP.Datas();
                DataSet ds = new DataSet();
                ds = eSTP.List9("P_PRAREG", "X", param2, "", "", "", "", "", "", "");
                dt = ds.Tables[0];

                if (dt.Rows.Count > 0)
                {
                    if (output == "E")
                        output = "noedit";

                    if (output == "D")
                        output = "nodelete";

                    if (output == "A")
                        output = "noadd";

                    return output;
                }

                eSTP.Datas();
                eSTP.save9("P_PRAREG", param1, param2, param3, param4, param5, param6, param7, param8, param9);

                return output;
            }
            else
                output = "gagal";
        }
        catch (Exception ex)
        {
            Response.Write(ex.Message);
            Response.End();
            return ex.Message;
        }

        return output;
    }
    private bool ServiceSelect(string sm)
    {
        switch (sm)
        {

            case "L":

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

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

                LANDCOMP.ExecuteSTP eSTP_L = new LANDCOMP.ExecuteSTP();
                eSTP_L.Datas();
                DataSet ds_L = new DataSet();
                ds_L = eSTP_L.List9("P_SRHTRM", param1L, "", "", "", "", "", "", userid, "");

                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]["srhtrmNmrReg"].ToString()) + "</cell>");
                    Response.Write("<cell>" + RemoveWhiteSpace(dt.Rows[i]["MidentNamass"].ToString()) + "</cell>");
                    Response.Write("<cell>" + RemoveWhiteSpace(dt.Rows[i]["MidentIdents"].ToString()) + "</cell>");
                    Response.Write("<cell>" + RemoveWhiteSpace(dt.Rows[i]["MidentNmrHps"].ToString()) + "</cell>");
                    Response.Write("<cell>" + RemoveWhiteSpace(dt.Rows[i]["mdesaaNmdesa"].ToString()) + "</cell>");
                    Response.Write("<cell>" + RemoveWhiteSpace(dt.Rows[i]["mcamatNmcamt"].ToString()) + "</cell>");
                    Response.Write("<cell>" + RemoveWhiteSpace(dt.Rows[i]["mkabupNmkabu"].ToString()) + "</cell>");
                    Response.Write("<cell>" + RemoveWhiteSpace(dt.Rows[i]["srhtrmAccept"].ToString()) + "</cell>");
                    Response.Write("<cell>" + RemoveWhiteSpace(dt.Rows[i]["srhtrmNmrSTs"].ToString()) + "</cell>");
                    Response.Write("</row>");
                }

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

                Response.End();

                return false;

            case "LS":

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

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

                }

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

                LANDCOMP.ExecuteSTP eSTP_LS = new LANDCOMP.ExecuteSTP();
                eSTP_LS.Datas();
                DataSet ds_LS = new DataSet();
                ds_L = eSTP_LS.List9("P_SRHTRM", param1LS, "", "", param2LS, "", "", userid, groups, "");

                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]["srhtrmNmrReg"].ToString()) + "</cell>");
                    Response.Write("<cell>" + RemoveWhiteSpace(dt.Rows[i]["MidentNamass"].ToString()) + "</cell>");
                    Response.Write("<cell>" + RemoveWhiteSpace(dt.Rows[i]["MidentIdents"].ToString()) + "</cell>");
                    Response.Write("<cell>" + RemoveWhiteSpace(dt.Rows[i]["MidentNmrHps"].ToString()) + "</cell>");
                    Response.Write("<cell>" + RemoveWhiteSpace(dt.Rows[i]["mdesaaNmdesa"].ToString()) + "</cell>");
                    Response.Write("<cell>" + RemoveWhiteSpace(dt.Rows[i]["mcamatNmcamt"].ToString()) + "</cell>");
                    Response.Write("<cell>" + RemoveWhiteSpace(dt.Rows[i]["mkabupNmkabu"].ToString()) + "</cell>");
                    Response.Write("<cell>" + RemoveWhiteSpace(dt.Rows[i]["srhtrmUsrSrh"].ToString()) + "</cell>");
                    Response.Write("<cell>" + RemoveWhiteSpace(dt.Rows[i]["srhtrmUsrTrm"].ToString()) + "</cell>");
                    Response.Write("<cell>" + RemoveWhiteSpace(dt.Rows[i]["srhtrmAccept"].ToString()) + "</cell>");
                    Response.Write("<cell>" + RemoveWhiteSpace(dt.Rows[i]["srhtrmNmrSTs"].ToString()) + "</cell>");
                    Response.Write("</row>");
                }

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

                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.List9("P_SRHTRM", Param1, Param2, "", "", "", "", "","","");

                dt = ds.Tables[0];

                Response.ContentType = "text/plain";
                Response.Write(dt.Rows[0][""].ToString() + "|"); //
                Response.Write(dt.Rows[0][""].ToString() + "|"); //1
                Response.Write(dt.Rows[0][""].ToString() + "|"); //2
                Response.Write(dt.Rows[0][""].ToString() + "|"); //3

                dt.Dispose();

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

            //return false;

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

            default:
                Response.ContentType = "text/plain";
                Response.End();
                return true;
        }
    }
Пример #3
0
    private bool ServiceSelect(string sm)
    {
        switch (sm)
        {
            case "L":

                var param1L = Request.Params["param1"].ToString();
                var param2L = Request.Params["param2"].ToString();
                LANDCOMP.ExecuteSTP eSTP_L = new LANDCOMP.ExecuteSTP();
                eSTP_L.Datas();
                DataSet ds_L = new DataSet();
                ds_L = eSTP_L.List9("P_NEGOSI_D", param1L, param2L, "", "", "", "", "", "", "");
                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]["negosiDatess"].ToString()) + "</cell>");
                    Response.Write("<cell>" + RemoveWhiteSpace(dt.Rows[i]["negosiObjeks"].ToString()) + "</cell>");
                    Response.Write("<cell>" + RemoveWhiteSpace(dt.Rows[i]["negosiLuasss"].ToString()) + "</cell>");
                    Response.Write("<cell>" + RemoveWhiteSpace(dt.Rows[i]["negosiHMinta"].ToString()) + "</cell>");
                    Response.Write("<cell>" + RemoveWhiteSpace(dt.Rows[i]["negosiJHMinta"].ToString()) + "</cell>");
                    Response.Write("<cell>" + RemoveWhiteSpace(dt.Rows[i]["negosiHTawar"].ToString()) + "</cell>");
                    Response.Write("<cell>" + RemoveWhiteSpace(dt.Rows[i]["negosiJHTawar"].ToString()) + "</cell>");
                    Response.Write("<cell>" + RemoveWhiteSpace(dt.Rows[i]["Selisih"].ToString()) + "</cell>");
                    Response.Write("<cell>" + RemoveWhiteSpace(dt.Rows[i]["negosiSequen"].ToString()) + "</cell>");
                    Response.Write("</row>");
                }
                Response.Write("</rows>");
                dt.Dispose();

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

            case "V":
                Response.ContentType = "text/plain";
                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.List13("P_NEGOSI", Param1, Param2, "", "", "", "", "", "", "", "", "", "", "");

                dt = ds.Tables[0];

                Response.ContentType = "text/plain";
                Response.Write(dt.Rows[0]["negosiNmrNeg"].ToString() + "|"); //0
                Response.Write(dt.Rows[0]["registNmrReg"].ToString() + "|"); //1
                Response.Write(dt.Rows[0]["pengtoNmrPid"].ToString() + "|"); //2
                Response.Write(dt.Rows[0]["negosiKetrgn"].ToString() + "|"); //3
                Response.Write(dt.Rows[0]["negosiSepakt"].ToString() + "|"); //4
                Response.Write(dt.Rows[0]["negosiSKGR"].ToString() + "|"); //5
                Response.Write(dt.Rows[0]["negosiKetEks"].ToString() + "|"); //6
                Response.Write(dt.Rows[0]["negosiEkseps"].ToString() + "|"); //7
                Response.Write(dt.Rows[0]["minta"].ToString() + "|"); //8
                Response.Write(dt.Rows[0]["tawar"].ToString() + "|"); //9
                Response.Write(dt.Rows[0]["tglNego"].ToString() + "|"); //10

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

            case "I":

                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 param9 = ""; if (Request.Params["param9"] is object) param9 = Request.Params["param9"].ToString();
                String sql = "";
                String output = "";

                LANDCOMP.ExecuteSTP eSTP_IA = new LANDCOMP.ExecuteSTP();
                eSTP_IA.Datas();
                eSTP_IA.save9("P_NEGOSI_D", param1, param2, param3, param4, param5, param6, param7, param8, param9);

                return false;

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

            default:
                Response.ContentType = "text/plain";
                Response.End();
                return true;
        }
    }
Пример #4
0
    private bool ServiceSelect(string sm)
    {
        switch (sm)
        {

            case "L":

                var param1L = Request.Params["param1"].ToString();
                var param2L = Request.Params["param2"].ToString();
                var param5L = Request.Params["param5"].ToString();
                LANDCOMP.ExecuteSTP eSTP_L = new LANDCOMP.ExecuteSTP();
                eSTP_L.Datas();
                DataSet ds_L = new DataSet();
                ds_L = eSTP_L.List9("P_NEGOSI_D", param1L, param2L, "", "", param5L, "", "", "", "");
                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]["negosiDatess"].ToString()) + "</cell>");
                    Response.Write("<cell>" + RemoveWhiteSpace(dt.Rows[i]["negosiObjeks"].ToString()) + "</cell>");
                    Response.Write("<cell>" + RemoveWhiteSpace(dt.Rows[i]["negosiLuasss"].ToString()) + "</cell>");
                    Response.Write("<cell>" + RemoveWhiteSpace(dt.Rows[i]["negosiHMinta"].ToString()) + "</cell>");
                    Response.Write("<cell>" + RemoveWhiteSpace(dt.Rows[i]["negosiJHMinta"].ToString()) + "</cell>");
                    Response.Write("<cell>" + RemoveWhiteSpace(dt.Rows[i]["negosiHTawar"].ToString()) + "</cell>");
                    Response.Write("<cell>" + RemoveWhiteSpace(dt.Rows[i]["negosiJHTawar"].ToString()) + "</cell>");
                    Response.Write("<cell>" + RemoveWhiteSpace(dt.Rows[i]["Selisih"].ToString()) + "</cell>");
                    Response.Write("<cell>" + RemoveWhiteSpace(dt.Rows[i]["negosiSequen"].ToString()) + "</cell>");
                    Response.Write("<cell>" + RemoveWhiteSpace(dt.Rows[i]["negosiNegoKe"].ToString()) + "</cell>");
                    if (dt.Rows[i]["Del"].ToString() != "0")
                    {
                        Response.Write("<cell>" + RemoveWhiteSpace("Delete^javascript:Hapus(\"" + "DND" + "\",\"" + "DND" + "\",\"" + dt.Rows[i]["negosiNmrNeg"].ToString() + "\",\"" + dt.Rows[i]["negosiSequen"].ToString() + "\",\"" + dt.Rows[i]["negosiNegoKe"].ToString() + "\");^_self") + "</cell>");
                    }
                    Response.Write("</row>");
                }
                Response.Write("</rows>");
                dt.Dispose();

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

                return false;

            case "VNK":

                Response.ContentType = "text/plain";
                var Param1LH = Request.Params["param1"].ToString();
                var Param2LH = Request.Params["param2"].ToString();
                var Param5LH = Request.Params["param5"].ToString();
                LANDCOMP.ExecuteSTP eSTP_LH = new LANDCOMP.ExecuteSTP();
                eSTP_LH.Datas();
                DataSet ds_LH = new DataSet();

                ds_LH = eSTP_LH.List9("P_NEGOSI_D", Param1LH, Param2LH, "", "", Param5LH, "", "", "", "");

                dt = ds_LH.Tables[0];

                Response.ContentType = "text/plain";
                Response.Write(dt.Rows[0]["minta"].ToString() + "|"); //8
                Response.Write(dt.Rows[0]["tawar"].ToString() + "|"); //9
                dt.Dispose();

                Response.End();

                return false;

            case "NK":
                var Param2dd = Request.Params["param2"].ToString();

                query = @"SELECT DISTINCT negosiNegoKe
                            FROM NEGOSI_D a
                            INNER JOIN NEGOSI b
                            ON a.negosiNmrNeg = b.negosiNmrNeg
                            WHERE b.negosiNmrNeg = '" + Param2dd + "'";
                dt = getDataTable(query);
                if (dt.Rows.Count > 0)
                {
                    ddNegosiasi.Items.Clear();
                    for (int i = 0; i < dt.Rows.Count; i++)
                    {
                        ddNegosiasi.Items.Add(new ListItem(dt.Rows[i]["negosiNegoKe"].ToString(), dt.Rows[i]["negosiNegoKe"].ToString()));
                    }
                }
                dt.Dispose();

                return false;

            case "V":

                Response.ContentType = "text/plain";
                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.List13("P_NEGOSI", Param1, Param2, "", "", "", "", "", "", "", "", "", "", "");

                dt = ds.Tables[0];

                Response.ContentType = "text/plain";
                Response.Write(dt.Rows[0]["negosiNmrNeg"].ToString() + "|"); //0
                Response.Write(dt.Rows[0]["registNmrReg"].ToString() + "|"); //1
                Response.Write(dt.Rows[0]["pengtoNmrPid"].ToString() + "|"); //2
                Response.Write(dt.Rows[0]["negosiKetrgn"].ToString() + "|"); //3
                Response.Write(dt.Rows[0]["negosiSepakt"].ToString() + "|"); //4
                Response.Write(dt.Rows[0]["negosiSKGR"].ToString() + "|"); //5
                Response.Write(dt.Rows[0]["negosiKetEks"].ToString() + "|"); //6
                Response.Write(dt.Rows[0]["negosiEkseps"].ToString() + "|"); //7
                Response.Write(dt.Rows[0]["minta"].ToString() + "|"); //8
                Response.Write(dt.Rows[0]["tawar"].ToString() + "|"); //9
                Response.Write(dt.Rows[0]["tglNego"].ToString() + "|"); //10
                Response.Write(dt.Rows[0]["negosiNegoKe"].ToString() + "|"); //11

                //isiNegoKe();

                dt.Dispose();

                Response.End();

                return false;

            case "I":

                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 param9 = ""; if (Request.Params["param9"] is object) param9 = Request.Params["param9"].ToString();
                String sql = "";
                String output = "";

                LANDCOMP.ExecuteSTP eSTP_IA = new LANDCOMP.ExecuteSTP();
                eSTP_IA.Datas();
                eSTP_IA.save9("P_NEGOSI_D", param1, param2, param3, param4, param5, param6, param7, param8, param9);

                return false;

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

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