Exemplo n.º 1
0
 protected void lnkBtnLogout_Click(object sender, EventArgs e)
 {
     try
     {
         DataSet dsDatetime = objHotLeadBL.GetDatetime();
         DateTime dtNow = Convert.ToDateTime(dsDatetime.Tables[0].Rows[0]["Datetime"].ToString());
         HotLeadsBL objHotLeadsBL = new HotLeadsBL();
         objHotLeadsBL.Perform_LogOut(Convert.ToInt32(Session[Constants.USER_ID]), dtNow, Convert.ToInt32(Session[Constants.USERLOG_ID]), 2);
         Session.Abandon();
         Response.Redirect("Login.aspx");
     }
     catch (Exception ex)
     {
     }
 }
Exemplo n.º 2
0
    public ArrayList GetAllLoginTransferAgentsDetailsService()
    {
        DataSet ds = new DataSet();
        HotLeadsBL objHotLeadsBL = new HotLeadsBL();
        ArrayList arr = new ArrayList();
        ds = objHotLeadsBL.GetAllLoginTransferAgentsDetails();

        if (ds.Tables[0].Rows.Count > 0)
        {
            for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
            {
                arr.Add(ds.Tables[0].Rows[i]["AgentUFirstName"].ToString() + "," + ds.Tables[0].Rows[i]["AgentCenterCode"].ToString());
            }
        }
        return arr;
    }
Exemplo n.º 3
0
    protected void lnkBtnLogout_Click(object sender, EventArgs e)
    {
        try
        {
            int LeadStatus = Convert.ToInt32(2);
            if (txtPhone.Text != "")
            {
                DataSet dsDatetime = objHotLeadBL.GetDatetime();
                DateTime dtNow = Convert.ToDateTime(dsDatetime.Tables[0].Rows[0]["Datetime"].ToString());
                string SellerPhone = txtPhone.Text;
                SellerPhone = SellerPhone.Replace("-", "");
                SellerPhone = SellerPhone.Replace("-", "");
                DataSet dsReturnExists = objHotLeadBL.ChkUserPhoneNumberExistsForReturned(SellerPhone);
                if (dsReturnExists.Tables[0].Rows.Count > 0)
                {
                    Session["NewSaleCarID"] = dsReturnExists.Tables[0].Rows[0]["carid"].ToString();
                    Session["NewSaleUID"] = dsReturnExists.Tables[0].Rows[0]["uid"].ToString();
                    Session["NewSalePostingID"] = dsReturnExists.Tables[0].Rows[0]["postingID"].ToString();
                    Session["NewSaleUserPackID"] = dsReturnExists.Tables[0].Rows[0]["UserPackID"].ToString();
                    Session["NewSaleSellerID"] = dsReturnExists.Tables[0].Rows[0]["sellerID"].ToString();
                    Session["NewSalePSID1"] = dsReturnExists.Tables[0].Rows[0]["PSID1"].ToString();
                    if (dsReturnExists.Tables[0].Rows[0]["PSID2"].ToString() != "")
                    {
                        Session["NewSalePSID2"] = Convert.ToInt32(dsReturnExists.Tables[0].Rows[0]["PSID2"].ToString());
                    }
                    if (dsReturnExists.Tables[0].Rows[0]["PaymentID"].ToString() != "")
                    {
                        Session["NewSalePaymentID"] = Convert.ToInt32(dsReturnExists.Tables[0].Rows[0]["PaymentID"].ToString());
                    }
                    int SaleAgentID = Convert.ToInt32(dsReturnExists.Tables[0].Rows[0]["SaleAgentID"].ToString());
                    SaveInfo(LeadStatus, SaleAgentID);
                    HotLeadsBL objHotLeadsBL = new HotLeadsBL();
                    objHotLeadsBL.Perform_LogOut(Convert.ToInt32(Session[Constants.USER_ID]), dtNow, Convert.ToInt32(Session[Constants.USERLOG_ID]), 2);
                    Session.Abandon();
                    Response.Redirect("Login.aspx");
                }
                else
                {
                    DataSet dsUserExists = objHotLeadBL.ChkUserPhoneNumberExistsForSale(SellerPhone);
                    if (dsUserExists.Tables[0].Rows.Count > 0)
                    {
                        HotLeadsBL objHotLeadsBL = new HotLeadsBL();
                        objHotLeadsBL.Perform_LogOut(Convert.ToInt32(Session[Constants.USER_ID]), dtNow, Convert.ToInt32(Session[Constants.USERLOG_ID]), 2);
                        Session.Abandon();
                        Response.Redirect("Login.aspx");
                    }
                    else
                    {
                        DataSet dsUserDraftExists = objHotLeadBL.ChkUserPhoneNumberExists(SellerPhone);
                        if (dsUserDraftExists.Tables[0].Rows.Count > 0)
                        {
                            Session["NewSaleCarID"] = dsUserDraftExists.Tables[0].Rows[0]["carid"].ToString();
                            Session["NewSaleUID"] = dsUserDraftExists.Tables[0].Rows[0]["uid"].ToString();
                            Session["NewSalePostingID"] = dsUserDraftExists.Tables[0].Rows[0]["postingID"].ToString();
                            Session["NewSaleUserPackID"] = dsUserDraftExists.Tables[0].Rows[0]["UserPackID"].ToString();
                            Session["NewSaleSellerID"] = dsUserDraftExists.Tables[0].Rows[0]["sellerID"].ToString();
                            Session["NewSalePSID1"] = dsUserDraftExists.Tables[0].Rows[0]["PSID1"].ToString();
                            if (dsUserDraftExists.Tables[0].Rows[0]["PSID2"].ToString() != "")
                            {
                                Session["NewSalePSID2"] = Convert.ToInt32(dsUserDraftExists.Tables[0].Rows[0]["PSID2"].ToString());
                            }
                            if (dsUserDraftExists.Tables[0].Rows[0]["PaymentID"].ToString() != "")
                            {
                                Session["NewSalePaymentID"] = Convert.ToInt32(dsUserDraftExists.Tables[0].Rows[0]["PaymentID"].ToString());
                            }
                            int SaleAgentID = Convert.ToInt32(dsUserDraftExists.Tables[0].Rows[0]["SaleAgentID"].ToString());
                            SaveInfo(LeadStatus, SaleAgentID);
                            HotLeadsBL objHotLeadsBL = new HotLeadsBL();
                            objHotLeadsBL.Perform_LogOut(Convert.ToInt32(Session[Constants.USER_ID]), dtNow, Convert.ToInt32(Session[Constants.USERLOG_ID]), 2);
                            Session.Abandon();
                            Response.Redirect("Login.aspx");
                        }
                        else
                        {
                            int SaleAgentID = 0;
                            SaveInfo(LeadStatus, SaleAgentID);
                            HotLeadsBL objHotLeadsBL = new HotLeadsBL();
                            objHotLeadsBL.Perform_LogOut(Convert.ToInt32(Session[Constants.USER_ID]), dtNow, Convert.ToInt32(Session[Constants.USERLOG_ID]), 2);
                            Session.Abandon();
                            Response.Redirect("Login.aspx");
                        }
                    }
                }
            }
            else
            {
                DataSet dsDatetime = objHotLeadBL.GetDatetime();
                DateTime dtNow = Convert.ToDateTime(dsDatetime.Tables[0].Rows[0]["Datetime"].ToString());
                HotLeadsBL objHotLeadsBL = new HotLeadsBL();
                objHotLeadsBL.Perform_LogOut(Convert.ToInt32(Session[Constants.USER_ID]), dtNow, Convert.ToInt32(Session[Constants.USERLOG_ID]), 2);
                Session.Abandon();
                Response.Redirect("Login.aspx");
            }

        }
        catch (Exception ex)
        {
        }
    }
Exemplo n.º 4
0
 protected void lnkBtnLogout_Click(object sender, EventArgs e)
 {
     try
     {
         if (hdnItemSelect.Value == "1")
         {
             Tabselect.Value = "1";
             System.Web.UI.ScriptManager.RegisterClientScriptBlock(Page, typeof(Page), "Script", "TabsScripting();", true);
             //System.Web.UI.ScriptManager.RegisterClientScriptBlock(Page, typeof(Page), "Script", "CheckAlert();", true);
             //ClientScript.RegisterStartupScript(typeof(Page), "KyAUIDFCS", "<script language='javascript' type='text/javascript'>CheckAlert();</script>");
             mdepAlertExists.Show();
             lblErrorExists.Visible = true;
             lblErrorExists.Text = "Please dispose the current car";
         }
         else
         {
             if (Session["LiveTransferPostingID"].ToString() != "")
             {
                 int PostingIDOld = Convert.ToInt32(Session["LiveTransferPostingID"].ToString());
                 int IsLockedOld = 0;
                 DataSet dsLockCust = objHotLeadBL.USP_Lock_Customer(PostingIDOld, IsLockedOld);
             }
             HotLeadsBL objHotLeadsBL = new HotLeadsBL();
             DataSet dsDatetime = objHotLeadBL.GetDatetime();
             DateTime dtNow = Convert.ToDateTime(dsDatetime.Tables[0].Rows[0]["Datetime"].ToString());
             objHotLeadsBL.Perform_LogOut(Convert.ToInt32(Session[Constants.USER_ID]), dtNow, Convert.ToInt32(Session[Constants.USERLOG_ID]), 2);
             Session.Abandon();
             Response.Redirect("Login.aspx");
         }
     }
     catch (Exception ex)
     {
     }
 }