Ejemplo n.º 1
0
    /// <summary>
    ///
    /// </summary>
    private void GetAllContacts()
    {
        if ((EViewType)ViewState["ViewType"] == EViewType.BUSINESSCARD)
        {
            ViewState["PageSize"] = 10;
        }
        else
        {
            ViewState["PageSize"] = 30;
        }

        //FranchisorService service = new FranchisorService();
        if ((EListType)ViewState["ListType"] != EListType.ALL)
        {
            ViewState["PageNumber"] = 1;
        }

        int itotalcount = 0;

        //EContact[] arrContact = service.GetAllContact(Convert.ToInt32(ViewState["PageNumber"]), true, Convert.ToInt16(ViewState["PageSize"]), true, out itotalcount, out boltotalcountspecified);

        FranchisorDAL objDAL      = new FranchisorDAL();
        var           listContact = objDAL.GetContacts(0, "", 2, Convert.ToInt32(ViewState["PageNumber"]),
                                                       Convert.ToInt16(ViewState["PageSize"]), out itotalcount);

        EContact[] arrContact = null;
        if (listContact != null)
        {
            arrContact = listContact.ToArray();
        }

        LoadGrid(arrContact, itotalcount);
        ViewState["ListType"] = EListType.ALL;
    }
Ejemplo n.º 2
0
    private void GetContactsByProspectID()
    {
        if ((EViewType)ViewState["ViewType"] == EViewType.BUSINESSCARD)
        {
            ViewState["PageSize"] = 10;
        }
        else
        {
            ViewState["PageSize"] = 30;
        }

        //FranchisorService service = new FranchisorService();
        if ((EListType)ViewState["ListType"] != EListType.PROSPECT)
        {
            ViewState["PageNumber"] = 1;
        }

        int itotalcount = 0;

        //EContact[] arrContact = service.GetContactByProspectID(Convert.ToInt32(Session["ProspectID"].ToString()), true, Convert.ToInt32(ViewState["PageNumber"]), true, Convert.ToInt16(ViewState["PageSize"]), true, out itotalcount, out boltotalcountspecified);

        FranchisorDAL objDAL      = new FranchisorDAL();
        var           listContact = objDAL.GetContacts(Convert.ToInt32(Session["ProspectID"].ToString()), string.Empty, 0,
                                                       Convert.ToInt32(ViewState["PageNumber"]),
                                                       Convert.ToInt16(ViewState["PageSize"]), out itotalcount);

        EContact[] arrContact = null;
        if (listContact != null)
        {
            arrContact = listContact.ToArray();
        }

        LoadGrid(arrContact, itotalcount);
        ViewState["ListType"] = EListType.PROSPECT;
    }
Ejemplo n.º 3
0
    private void GetContactsByCharacter(string strcharacter)
    {
        if ((EViewType)ViewState["ViewType"] == EViewType.BUSINESSCARD)
        {
            ViewState["PageSize"] = 10;
        }
        else
        {
            ViewState["PageSize"] = 30;
        }

        //FranchisorService service = new FranchisorService();
        if ((EListType)ViewState["ListType"] != EListType.CHARACTER)
        {
            ViewState["PageNumber"] = 1;
        }

        int itotalcount = 0;

        //EContact[] arrContact = service.GetContactByFilterCharacter(strcharacter, Convert.ToInt32(ViewState["PageNumber"]), true, Convert.ToInt16(ViewState["PageSize"]), true, out itotalcount, out boltotalcountspecified);

        FranchisorDAL objDAL      = new FranchisorDAL();
        var           listContact = objDAL.GetContacts(0, strcharacter, 3, Convert.ToInt32(ViewState["PageNumber"]),
                                                       Convert.ToInt16(ViewState["PageSize"]), out itotalcount);

        EContact[] arrContact = null;
        if (listContact != null)
        {
            arrContact = listContact.ToArray();
        }

        LoadGrid(arrContact, itotalcount);
        ViewState["ListType"]     = EListType.CHARACTER;
        ViewState["SearchString"] = strcharacter;

        this.ClientScript.RegisterStartupScript(typeof(string), "jscodeActiveAlphabet", "document.getElementById('alpha" + strcharacter + "').className = 'activealphabetvaluebox'; ", true);
    }
Ejemplo n.º 4
0
    /// <summary>
    ///
    /// </summary>
    /// <param name="searchname"></param>
    /// <param name="sessionprospectid"></param>
    private void SearchContact(string searchname, int sessionprospectid)
    {
        if ((EViewType)ViewState["ViewType"] == EViewType.BUSINESSCARD)
        {
            ViewState["PageSize"] = 10;
        }
        else
        {
            ViewState["PageSize"] = 30;
        }

        //FranchisorService service = new FranchisorService();
        if ((EListType)ViewState["ListType"] != EListType.SEARCH)
        {
            ViewState["PageNumber"] = 1;
        }

        int itotalcount = 0;

        //EContact[] arrContact = service.GetContactByName(sessionprospectid, true, searchname, Convert.ToInt32(ViewState["PageNumber"]), true, Convert.ToInt16(ViewState["PageSize"]), true, out itotalcount, out boltotalcountspecified);

        FranchisorDAL objDAL      = new FranchisorDAL();
        var           listContact = objDAL.GetContacts(sessionprospectid, searchname, 1, Convert.ToInt32(ViewState["PageNumber"]),
                                                       Convert.ToInt16(ViewState["PageSize"]), out itotalcount);

        EContact[] arrContact = null;
        if (listContact != null)
        {
            arrContact = listContact.ToArray();
        }

        LoadGrid(arrContact, itotalcount);

        ViewState["ListType"]     = EListType.SEARCH;
        ViewState["SearchString"] = searchname;
    }