Esempio n. 1
0
 /// <summary>
 /// To edit Program Lead details in grid
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void lnkEdit_Click(object sender, EventArgs e)
 {
     LinkButton     lnk       = sender as LinkButton;
     GridViewRow    row       = (GridViewRow)lnk.Parent.Parent;
     int            Idx       = row.RowIndex;
     int            IntResult = 0;
     bool           Status;
     int            ProLeadID;
     ProgramLeadBAL ProgramLeadBAL = new ProgramLeadBAL();
     LinkButton     lblIsActive    = (GrdProgramLead.Rows[Idx].FindControl("lnkEdit") as LinkButton);
     Label          lblStatus      = (GrdProgramLead.Rows[Idx].FindControl("lnkStatus") as Label);
     {
         if (lblStatus.Text == "Active" || lblStatus.Text == "True")
         {
             Status           = false;
             lblStatus.Text   = "InActive";
             lblIsActive.Text = "Activate";
         }
         else
         {
             Status           = true;
             lblStatus.Text   = "Active";
             lblIsActive.Text = "Deactivate";
         }
         ProLeadID            = Convert.ToInt32(lnk.CommandArgument.ToString());
         lblSelectID.Text     = ProLeadID.ToString();
         Session["ProLeadID"] = lblSelectID.Text;
         IntResult            = ProgramLeadBAL.UpdateProgramLead(ProLeadID, Status, LoginUser, Ret);
     }
 }
Esempio n. 2
0
    /// <summary>
    ///  To get specific Program Lead details
    /// </summary>
    /// <param name="ProLeadUserID"></param>
    /// <returns></returns>
    protected DataTable GetUserDetails(int ProLeadUserID)
    {
        ProgramLeadBAL ProgramLeadBAL = new ProgramLeadBAL();
        DataTable      DtGetUser      = new DataTable();

        try
        {
            DtGetUser = ProgramLeadBAL.SelectProgramLeadID(ProLeadUserID, LoginUser, Ret);
        }
        catch
        {
            throw;
        }
        finally
        {
            ProgramLeadBAL = null;
        }
        return(DtGetUser);
    }
Esempio n. 3
0
    /// <summary>
    /// To get Program Lead having active status
    /// </summary>
    /// <param name="IsActive"></param>
    /// <returns></returns>
    protected DataTable ProLeadActiveDetails(bool IsActive)
    {
        ProgramLeadBAL ProgramLeadBAL = new ProgramLeadBAL();
        DataTable      DtProLeadADet  = new DataTable();

        try
        {
            DtProLeadADet = ProgramLeadBAL.LoadActiveProgramLead(LoginUser, Ret, IsActive);
        }
        catch
        {
            throw;
        }
        finally
        {
            ProgramLeadBAL = null;
        }
        return(DtProLeadADet);
    }
Esempio n. 4
0
    protected DataTable PLActiveDetails(bool IsActive)
    {
        ProgramLeadBAL plBAL  = new ProgramLeadBAL();
        DataTable      dTable = new DataTable();

        try
        {
            dTable = plBAL.LoadActiveProgramLead(LoginUser, Ret, IsActive);
        }
        catch
        {
            throw;
        }
        finally
        {
            plBAL = null;
        }

        return(dTable);
    }
Esempio n. 5
0
    /// <summary>
    /// To save and update Program Lead details
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void btnSave_Click(object sender, EventArgs e)
    {
        ProgramLeadBAL ProgramLeadBAL = new ProgramLeadBAL();
        int            UserID         = Convert.ToInt32(ddlProLeadUser.SelectedValue.ToString());
        string         Status         = ddlProLeadStatus.SelectedValue.ToString();
        bool           IsActive       = true;

        if (Status == "Active")
        {
            IsActive = true;
        }
        else if (Status == "InActive")
        {
            IsActive = false;
        }
        if (btnSave.Text == "Save")
        {
            try
            {
                int Result = ProgramLeadBAL.InsertProgramLead(UserID, IsActive, LoginUser, Ret);
                DtProLead = ProLeadDetails();
                ViewState["DtProLead"] = DtProLead;
                BindProLead(DtProLead);
                MsgProLead.Msg = "Program Lead added successfully";
                MsgProLead.showmsg();
            }
            catch (Exception ee)
            {
                if (ee.Message == "DuProLeadicate Entry")
                {
                    MsgProLead.Msg = "Program Lead already exists";
                    MsgProLead.showmsg();
                    ClearProLead();
                }
            }
            finally
            {
                ProgramLeadBAL = null;
            }
        }
    }
    protected DataTable PLActiveDetails(bool IsActive)
    {
        ProgramLeadBAL plBAL = new ProgramLeadBAL();
        DataTable dTable = new DataTable();
        try
        {
            dTable = plBAL.LoadActiveProgramLead(LoginUser, Ret, IsActive);
        }
        catch (Exception ee)
        {
            throw;
        }
        finally
        {
            plBAL = null;
        }

        return dTable;
    }
 /// <summary>
 /// To get Program Lead details from Program Lead Business access layer
 /// </summary>
 /// <returns></returns>
 protected DataTable ProLeadDetails()
 {
     ProgramLeadBAL ProgramLeadBAL = new ProgramLeadBAL();
     DataTable DtProLeadDet = new DataTable();
     try
     {
         DtProLeadDet = ProgramLeadBAL.LoadAllProgramLead(LoginUser, Ret);
     }
     catch
     {
         throw;
     }
     finally
     {
         ProgramLeadBAL = null;
     }
     return DtProLeadDet;
 }
 /// <summary>
 /// To get Program Lead having active status
 /// </summary>
 /// <param name="IsActive"></param>
 /// <returns></returns>
 protected DataTable ProLeadActiveDetails(bool IsActive)
 {
     ProgramLeadBAL ProgramLeadBAL = new ProgramLeadBAL();
     DataTable DtProLeadADet = new DataTable();
     try
     {
         DtProLeadADet = ProgramLeadBAL.LoadActiveProgramLead(LoginUser, Ret, IsActive);
     }
     catch
     {
         throw;
     }
     finally
     {
         ProgramLeadBAL = null;
     }
     return DtProLeadADet;
 }
 /// <summary>
 /// To edit Program Lead details in grid
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void lnkEdit_Click(object sender, EventArgs e)
 {
     LinkButton lnk = sender as LinkButton;
     GridViewRow row = (GridViewRow)lnk.Parent.Parent;
     int Idx = row.RowIndex;
     int IntResult = 0;
     bool Status;
     int ProLeadID;
     ProgramLeadBAL ProgramLeadBAL = new ProgramLeadBAL();
     LinkButton lblIsActive = (GrdProgramLead.Rows[Idx].FindControl("lnkEdit") as LinkButton);
     Label lblStatus = (GrdProgramLead.Rows[Idx].FindControl("lnkStatus") as Label);
     {
         if (lblStatus.Text == "Active" || lblStatus.Text == "True")
         {
             Status = false;
             lblStatus.Text = "InActive";
             lblIsActive.Text = "Activate";
         }
         else
         {
             Status = true;
             lblStatus.Text = "Active";
             lblIsActive.Text = "Deactivate";
         }
         ProLeadID = Convert.ToInt32(lnk.CommandArgument.ToString());
         lblSelectID.Text = ProLeadID.ToString();
         Session["ProLeadID"] = lblSelectID.Text;
         IntResult = ProgramLeadBAL.UpdateProgramLead(ProLeadID, Status, LoginUser, Ret);
     }
 }
 /// <summary>
 ///  To get specific Program Lead details 
 /// </summary>
 /// <param name="ProLeadUserID"></param>
 /// <returns></returns>
 protected DataTable GetUserDetails(int ProLeadUserID)
 {
     ProgramLeadBAL ProgramLeadBAL = new ProgramLeadBAL();
        DataTable DtGetUser = new DataTable();
        try
        {
        DtGetUser = ProgramLeadBAL.SelectProgramLeadID(ProLeadUserID, LoginUser, Ret);
        }
        catch
        {
        throw;
        }
        finally
        {
        ProgramLeadBAL = null;
        }
        return DtGetUser;
 }
 /// <summary>
 /// To save and update Program Lead details
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void btnSave_Click(object sender, EventArgs e)
 {
     ProgramLeadBAL ProgramLeadBAL = new ProgramLeadBAL();
     int UserID = Convert.ToInt32(ddlProLeadUser.SelectedValue.ToString());
     string Status = ddlProLeadStatus.SelectedValue.ToString();
     bool IsActive = true;
     if (Status == "Active")
     {
         IsActive = true;
     }
     else if (Status == "InActive")
     {
         IsActive = false;
     }
     if (btnSave.Text == "Save")
     {
         try
         {
             int Result = ProgramLeadBAL.InsertProgramLead(UserID, IsActive, LoginUser, Ret);
             DtProLead = ProLeadDetails();
             ViewState["DtProLead"] = DtProLead;
             BindProLead(DtProLead);
             MsgProLead.Msg = "Program Lead added successfully";
             MsgProLead.showmsg();
         }
         catch (Exception ee)
         {
             if (ee.Message == "DuProLeadicate Entry")
             {
                 MsgProLead.Msg = "Program Lead already exists";
                 MsgProLead.showmsg();
                 ClearProLead();
             }
         }
         finally
         {
             ProgramLeadBAL = null;
         }
     }
 }