Ejemplo n.º 1
0
    void loadAppParameter()
    {
        /*
         * string strSQL = "select * from(select dbo.f_convertDateToChar(dbo.f_getAplDate())ApplicationDate,dbo.f_getAppParameterValue('callcutoff') CallCutOff,dbo.f_getAppParameterValue('tglfin') TglFin, dbo.f_getAppParameterValue('lat') lat, dbo.f_getAppParameterValue('lng') lng)a";
         *
         * _DBcon c = new _DBcon();
         * foreach (System.Data.DataRow row in c.executeTextQ(strSQL))
         * {
         *  strApplicationDate = row["ApplicationDate"].ToString();
         *  strCallCutOff = row["CallCutOff"].ToString();
         *  strTglFin = row["TglFin"].ToString();
         * }
         */
        _DBcon c = new _DBcon();

        foreach (System.Data.DataRow row in c.executeProcQ("xml_login_loading", new _DBcon.sComParameter[] {
            new _DBcon.sComParameter("@user_id", System.Data.SqlDbType.VarChar, 50, hfUser.Value)
        }))
        {
            strApplicationDate = row["ApplicationDate"].ToString();
            strCallCutOff      = row["CallCutOff"].ToString();
            strTglFin          = row["TglFin"].ToString();
            str_branch_id      = row["branch_id"].ToString();
            str_branch_name    = row["branch_name"].ToString();
        }
    }
Ejemplo n.º 2
0
    void appSessionDelete(string UserID)
    {
        _DBcon d = new _DBcon();

        _DBcon.arrOutComPar hasil = d.executeProcNQ("appSessionDelete", new _DBcon.sComParameter[] {
            new _DBcon.sComParameter("@UserID", System.Data.SqlDbType.VarChar, 15, UserID)
        });
    }
Ejemplo n.º 3
0
    void create_session(string UserID, string SessionID)
    {
        _DBcon d = new _DBcon();

        _DBcon.arrOutComPar hasil = d.executeProcNQ("appCreateSession", new _DBcon.sComParameter[] {
            new _DBcon.sComParameter("@UserID", System.Data.SqlDbType.VarChar, 15, UserID),
            new _DBcon.sComParameter("@SessionID", System.Data.SqlDbType.VarChar, 50, SessionID)
        });
    }
Ejemplo n.º 4
0
    string getMenuXML(string userID)
    {
        _DBcon d = new _DBcon();

        _DBcon.arrOutComPar hasil = d.executeProcNQ("getMenuXMLUL", new _DBcon.sComParameter[] {
            new _DBcon.sComParameter("@UserID", System.Data.SqlDbType.VarChar, 15, userID),
            new _DBcon.sComParameter("@Ret", System.Data.SqlDbType.Xml, 0, System.Data.ParameterDirection.Output)
        });

        return(hasil["@Ret"].ToString());
    }
Ejemplo n.º 5
0
    string setMenuPavorite(string strUserID)
    {
        _DBcon d = new _DBcon();

        _DBcon.arrOutComPar hasil = d.executeProcNQ("getXMLMenuPavorite", new _DBcon.sComParameter[] {
            new _DBcon.sComParameter("@UserID", System.Data.SqlDbType.VarChar, 15, strUserID),
            new _DBcon.sComParameter("@Ret", System.Data.SqlDbType.Xml, 0, System.Data.ParameterDirection.Output)
        });

        return(convertXmlToString(hasil["@Ret"].ToString()));
    }
Ejemplo n.º 6
0
    void load_geotag()
    {
        string strSQL = "select * from(select dbo.f_convertDateToChar(dbo.f_getAplDate())ApplicationDate,dbo.f_getAppParameterValue('callcutoff') CallCutOff,dbo.f_getAppParameterValue('tglfin') TglFin, dbo.f_getAppParameterValue('lat') lat, dbo.f_getAppParameterValue('lng') lng)a";

        _DBcon c = new _DBcon();

        foreach (System.Data.DataRow row in c.executeTextQ(strSQL))
        {
            lat = row["lat"].ToString();
            lng = row["lng"].ToString();
        }
    }
Ejemplo n.º 7
0
    private void save_marketing(byte[] obj_file, string marketing_id)
    {
        _DBcon c = new _DBcon();

        _DBcon.arrOutComPar retval = c.executeProcNQ("act_marketing_save_ttd", new _DBcon.sComParameter[]
        {
            new _DBcon.sComParameter("@marketing_id", System.Data.SqlDbType.VarChar, 15, marketing_id),
            new _DBcon.sComParameter("@ttd_image", System.Data.SqlDbType.Image, 0, obj_file),
            new _DBcon.sComParameter("@file_type", System.Data.SqlDbType.VarChar, 200, hf_filetype.Value),
        }
                                                     );
    }
Ejemplo n.º 8
0
    void load_firstmenuid()
    {
        string strSQL = "select menuurl,initial,menuname from appmenu where menuid=dbo.f_getAppParameterValue('firstmenuid')";

        _DBcon c = new _DBcon();

        foreach (System.Data.DataRow row in c.executeTextQ(strSQL))
        {
            menu_url  = row["menuurl"].ToString();
            menu_name = row["menuname"].ToString();
            initial   = row["initial"].ToString();
        }
    }
Ejemplo n.º 9
0
    public s_service_device[] xml_service_device_list(string sn, string status, string name, string status_opr, string status_send, string inventory, string branch_id)
    {
        List <s_service_device> data = new List <s_service_device>();

        _DBcon c = new _DBcon();

        foreach (System.Data.DataRow row in c.executeProcQ("xml_service_device_list", new _DBcon.sComParameter[] {
            new _DBcon.sComParameter("@sn", System.Data.SqlDbType.VarChar, 50, sn),
            new _DBcon.sComParameter("@status", System.Data.SqlDbType.Char, 1, status),
            new _DBcon.sComParameter("@name", System.Data.SqlDbType.VarChar, 50, name),
            new _DBcon.sComParameter("@status_opr", System.Data.SqlDbType.Char, 1, status_opr),
            new _DBcon.sComParameter("@status_send", System.Data.SqlDbType.Char, 1, status_send),
            new _DBcon.sComParameter("@inventory", System.Data.SqlDbType.Char, 1, inventory),
            new _DBcon.sComParameter("@branch_id", System.Data.SqlDbType.VarChar, 10, branch_id)
        }))
        {
            data.Add(new s_service_device(
                         Convert.ToInt64(row["service_device_id"]), row["date_in"].ToString(), row["sn"].ToString(), row["device"].ToString(), row["customer_name"].ToString(),
                         Convert.ToBoolean(row["guarantee_sts"]), Convert.ToBoolean(row["inventory_sts"])
                         ));
        }
        return(data.ToArray());
    }
Ejemplo n.º 10
0
    protected void Page_Load(object sender, EventArgs e)
    {
        a = new App(Request, Response);
        Boolean status = false;


        load_firstmenuid();

        try
        {
            _DBcon d = new _DBcon();
            _DBcon.arrOutComPar hasil = d.executeProcNQ("appSessionCheck", new _DBcon.sComParameter[] {
                new _DBcon.sComParameter("@UserID", System.Data.SqlDbType.VarChar, 15, a.cookieUserIDValue),
                new _DBcon.sComParameter("@SessionID", System.Data.SqlDbType.VarChar, 50, a.cookieSessionIDValue),
                new _DBcon.sComParameter("@Ret", System.Data.SqlDbType.Bit, 0, System.Data.ParameterDirection.Output)
            });

            status = Convert.ToBoolean(hasil["@Ret"]);
        }
        catch
        {
            status = false;
        }
        finally
        {
            if (status == false)
            {
                Response.Redirect("login.aspx");
            }
            else
            {
                lMenu.Text = getMenuXML(a.cookieUserIDValue);
                load_geotag();
            }
        }
    }