Пример #1
0
 /// <summary>
 ///  To edit content developer 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                 CDID;
     ContentDeveloperBAL ContentDeveloperBAL = new ContentDeveloperBAL();
     LinkButton          lblIsActive         = (GrdContentDeveloper.Rows[idx].FindControl("lnkEdit") as LinkButton);
     Label               lblstatus           = (GrdContentDeveloper.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";
         }
         CDID             = Convert.ToInt32(lnk.CommandArgument.ToString());
         lblSelectID.Text = CDID.ToString();
         Session["CDID"]  = lblSelectID.Text;
         intResult        = ContentDeveloperBAL.UpdateContentDeveloper(CDID, Status, LoginUser, Ret);
     }
 }
Пример #2
0
    /// <summary>
    /// To save content developer details
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void btnSave_Click(object sender, EventArgs e)
    {
        ContentDeveloperBAL ContentDeveloperBAL = new ContentDeveloperBAL();
        int    UserID   = Convert.ToInt32(ddlConDevUser.SelectedValue.ToString());
        string Status   = ddlConDevStatus.SelectedValue.ToString();
        bool   IsActive = true;

        if (Status == "Active")
        {
            IsActive = true;
        }
        else if (Status == "InActive")
        {
            IsActive = false;
        }
        if (btnSave.Text == "Save")
        {
            try
            {
                // 'InsertContentDeveloper' is Content developer business Access Layer function called
                // to insert Content Developer details
                int Result = ContentDeveloperBAL.InsertContentDeveloper(UserID, IsActive, LoginUser, Ret);
                DtConDev = ConDevDetails();
                ViewState["DtConDev"] = DtConDev;
                BindConDev(DtConDev);
                msgConDev.Msg = "Record added successfully";
                msgConDev.showmsg();
            }
            catch (Exception ee)
            {
                // Duplicate Entry is catched when inserting Content Developer
                if (ee.Message == "Duplicate Entry")
                {
                    msgConDev.Msg = "Duplicate Entry!";
                    msgConDev.showmsg();
                    ClearConDev();
                }
            }
            finally
            {
                // Object is closed after use
                ContentDeveloperBAL = null;
            }
        }
    }
Пример #3
0
    /// <summary>
    ///  To Load Active Status Content Developer details from 'Content Developer Business Access Layer'
    /// </summary>
    /// <param name="IsActive"></param>
    /// <returns></returns>
    protected DataTable ConDevActiveDetails(bool IsActive)
    {
        ContentDeveloperBAL ContentDeveloperBAL = new ContentDeveloperBAL();
        DataTable           DtConDeve           = new DataTable();

        try
        {
            DtConDeve = ContentDeveloperBAL.LoadActiveContentDeveloper(LoginUser, Ret, IsActive);
        }
        catch
        {
            throw;
        }
        finally
        {
            ContentDeveloperBAL = null;
        }

        return(DtConDeve);
    }
Пример #4
0
    /// <summary>
    ///  To bind Content developer of 'Active' and 'InActive' Status
    /// </summary>
    /// <returns></returns>
    protected DataTable ConDevDetails()
    {
        ContentDeveloperBAL ContentDeveloperBAL = new ContentDeveloperBAL();
        DataTable           dTable = new DataTable();

        try
        {
            dTable = ContentDeveloperBAL.LoadAllContentDeveloper(LoginUser, Ret);
        }
        catch
        {
            throw;
        }
        finally
        {
            ContentDeveloperBAL = null;
        }

        return(dTable);
    }
    protected DataTable CDActiveDetails(bool IsActive)
    {
        ContentDeveloperBAL ContentDeveloperBAL = new ContentDeveloperBAL();
        DataTable           dTable = new DataTable();

        try
        {
            dTable = ContentDeveloperBAL.LoadActiveContentDeveloper(LoginUser, Ret, IsActive);
        }
        catch (Exception ee)
        {
            throw;
        }
        finally
        {
            ContentDeveloperBAL = null;
        }

        return(dTable);
    }
Пример #6
0
    /// <summary>
    ///  To get specific Content developer details
    /// </summary>
    /// <param name="ConDevID"></param>
    /// <returns></returns>

    protected DataTable GetUserDetails(int ConDevID)
    {
        ContentDeveloperBAL ContentDeveloperBAL = new ContentDeveloperBAL();
        DataTable           DtConDevGetDet      = new DataTable();

        try
        {
            // 'SelectContentDeveloperID' is called from Content developer BAL
            //to fetch specific ContentDeveloper details by passing ContentDeveloperID
            DtConDevGetDet = ContentDeveloperBAL.SelectContentDeveloperID(ConDevID, LoginUser, Ret);
        }
        catch
        {
            throw;
        }
        finally
        {
            ContentDeveloperBAL = null;
        }

        return(DtConDevGetDet);
    }
    protected DataTable CDActiveDetails(bool IsActive)
    {
        ContentDeveloperBAL ContentDeveloperBAL = new ContentDeveloperBAL();
        DataTable dTable = new DataTable();
        try
        {
            dTable = ContentDeveloperBAL.LoadActiveContentDeveloper(LoginUser, Ret, IsActive);
        }
        catch (Exception ee)
        {
            throw;
        }
        finally
        {
            ContentDeveloperBAL = null;
        }

        return dTable;
    }
 /// <summary>
 ///  To edit content developer 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 CDID;
     ContentDeveloperBAL ContentDeveloperBAL = new ContentDeveloperBAL();
     LinkButton lblIsActive = (GrdContentDeveloper.Rows[idx].FindControl("lnkEdit") as LinkButton);
     Label lblstatus = (GrdContentDeveloper.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";
         }
         CDID = Convert.ToInt32(lnk.CommandArgument.ToString());
         lblSelectID.Text = CDID.ToString();
         Session["CDID"] = lblSelectID.Text;
         intResult = ContentDeveloperBAL.UpdateContentDeveloper(CDID, Status, LoginUser, Ret);
     }
 }
    /// <summary>
    ///  To get specific Content developer details 
    /// </summary>
    /// <param name="ConDevID"></param>
    /// <returns></returns>
    protected DataTable GetUserDetails(int ConDevID)
    {
        ContentDeveloperBAL ContentDeveloperBAL = new ContentDeveloperBAL();
        DataTable DtConDevGetDet = new DataTable();
        try
        {
            // 'SelectContentDeveloperID' is called from Content developer BAL
            //to fetch specific ContentDeveloper details by passing ContentDeveloperID
            DtConDevGetDet = ContentDeveloperBAL.SelectContentDeveloperID(ConDevID, LoginUser, Ret);
        }
        catch
        {
            throw;
        }
        finally
        {
            ContentDeveloperBAL = null;
        }

        return DtConDevGetDet;
    }
    /// <summary>
    ///  To bind Content developer of 'Active' and 'InActive' Status
    /// </summary>
    /// <returns></returns>
    protected DataTable ConDevDetails()
    {
        ContentDeveloperBAL ContentDeveloperBAL = new ContentDeveloperBAL();
        DataTable dTable = new DataTable();
        try
        {
            dTable = ContentDeveloperBAL.LoadAllContentDeveloper(LoginUser, Ret);
        }
        catch
        {
            throw;
        }
        finally
        {
            ContentDeveloperBAL = null;
        }

        return dTable;
    }
    /// <summary>
    ///  To Load Active Status Content Developer details from 'Content Developer Business Access Layer'
    /// </summary>
    /// <param name="IsActive"></param>
    /// <returns></returns>
    protected DataTable ConDevActiveDetails(bool IsActive)
    {
        ContentDeveloperBAL ContentDeveloperBAL = new ContentDeveloperBAL();
        DataTable DtConDeve = new DataTable();
        try
        {
            DtConDeve = ContentDeveloperBAL.LoadActiveContentDeveloper(LoginUser, Ret, IsActive);
        }
        catch
        {
            throw;
        }
        finally
        {
            ContentDeveloperBAL = null;
        }

        return DtConDeve;
    }
 /// <summary>
 /// To save content developer details 
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void btnSave_Click(object sender, EventArgs e)
 {
     ContentDeveloperBAL ContentDeveloperBAL = new ContentDeveloperBAL();
     int UserID = Convert.ToInt32(ddlConDevUser.SelectedValue.ToString());
     string Status = ddlConDevStatus.SelectedValue.ToString();
     bool IsActive = true;
     if (Status == "Active")
     {
         IsActive = true;
     }
     else if (Status == "InActive")
     {
         IsActive = false;
     }
     if (btnSave.Text == "Save")
     {
         try
         {
             // 'InsertContentDeveloper' is Content developer business Access Layer function called
             // to insert Content Developer details
             int Result = ContentDeveloperBAL.InsertContentDeveloper(UserID, IsActive, LoginUser, Ret);
             DtConDev = ConDevDetails();
             ViewState["DtConDev"] = DtConDev;
             BindConDev(DtConDev);
             msgConDev.Msg = "Record added successfully";
             msgConDev.showmsg();
         }
         catch (Exception ee)
         {
             // Duplicate Entry is catched when inserting Content Developer
             if (ee.Message == "Duplicate Entry")
             {
                 msgConDev.Msg = "Duplicate Entry!";
                 msgConDev.showmsg();
                 ClearConDev();
             }
         }
         finally
         {
             // Object is closed after use
             ContentDeveloperBAL = null;
         }
     }
 }