コード例 #1
0
 /// <summary>
 ///  To edit intructional designer details
 /// </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         InsID;
     InstructionalDesignerBAL InstructionalDesignerBAL = new InstructionalDesignerBAL();
     LinkButton lblIsActive = (GrdInsDes.Rows[Idx].FindControl("lnkEdit") as LinkButton);
     Label      lblStatus   = (GrdInsDes.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";
         }
         InsID            = Convert.ToInt32(lnk.CommandArgument.ToString());
         lblSelectID.Text = InsID.ToString();
         Session["InsID"] = lblSelectID.Text;
         IntResult        = InstructionalDesignerBAL.UpdateInstructionalDesigner(InsID, Status, LoginUser, Ret);
     }
 }
コード例 #2
0
    /// <summary>
    ///  To save instructional designer details
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void btnSave_Click(object sender, EventArgs e)
    {
        InstructionalDesignerBAL InstructionalDesignerBAL = new InstructionalDesignerBAL();
        int    UserID   = Convert.ToInt32(ddlInsDesUser.SelectedValue.ToString());
        string Status   = ddlInsDesStatus.SelectedValue.ToString();
        bool   IsActive = true;

        if (Status == "Active")
        {
            IsActive = true;
        }
        else if (Status == "InActive")
        {
            IsActive = false;
        }
        if (btnSave.Text == "Save")
        {
            try
            {
                // 'InsertInstructionalDesigner' is Instructional Designer business Access Layer function called
                // to insert Instructional Designer details
                int Result = InstructionalDesignerBAL.InsertInstructionalDesigner(UserID, IsActive, LoginUser, Ret);
                DtInsDes = IDDetails();
                ViewState["DtInsDes"] = DtInsDes;
                BindInsDes(DtInsDes);
                MsgInsDes.Msg = "Record added successfully";
                MsgInsDes.showmsg();
            }
            catch (Exception ee)
            {
                // Duplicate Entry is catched when inserting Instructional Designer
                if (ee.Message == "Duplicate Entry")
                {
                    MsgInsDes.Msg = "Duplicate Entry!";
                    MsgInsDes.showmsg();
                    ClearInsDes();
                }
            }
            finally
            {
                InstructionalDesignerBAL = null;
            }
        }
    }
コード例 #3
0
    /// <summary>
    /// To bind Instructional Designer of active status
    /// </summary>
    /// <param name="IsActive"></param>
    /// <returns></returns>
    protected DataTable InsDesActiveDetails(bool IsActive)
    {
        InstructionalDesignerBAL InstructionalDesignerBAL = new InstructionalDesignerBAL();
        DataTable DtInsDesDet = new DataTable();

        try
        {
            DtInsDesDet = InstructionalDesignerBAL.LoadActiveInstructionalDesigner(LoginUser, Ret, IsActive);
        }
        catch
        {
            throw;
        }
        finally
        {
            InstructionalDesignerBAL = null;
        }

        return(DtInsDesDet);
    }
コード例 #4
0
    /// <summary>
    ///  To get specific instructional designer details
    /// </summary>
    /// <param name="InsID"></param>
    /// <returns></returns>
    protected DataTable GetUserDetails(int InsID)
    {
        InstructionalDesignerBAL InstructionalDesignerBAL = new InstructionalDesignerBAL();
        DataTable DtGetUser = new DataTable();

        try
        {
            DtGetUser = InstructionalDesignerBAL.SelectInstructionalDesignerID(InsID, LoginUser, Ret);
        }
        catch
        {
            throw;
        }
        finally
        {
            InstructionalDesignerBAL = null;
        }

        return(DtGetUser);
    }
コード例 #5
0
    /// <summary>
    /// To get Instructional Designer details
    /// </summary>
    /// <returns></returns>
    protected DataTable IDDetails()
    {
        InstructionalDesignerBAL idBAL = new InstructionalDesignerBAL();
        DataTable dTable = new DataTable();

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

        return(dTable);
    }
コード例 #6
0
    protected DataTable IDActiveDetails(bool IsActive)
    {
        InstructionalDesignerBAL IDBAl = new InstructionalDesignerBAL();
        DataTable dTable = new DataTable();

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

        return(dTable);
    }
コード例 #7
0
    protected DataTable IDActiveDetails(bool IsActive)
    {
        InstructionalDesignerBAL IDBAl = new InstructionalDesignerBAL();
        DataTable dTable = new DataTable();
        try
        {
            dTable = IDBAl.LoadActiveInstructionalDesigner(LoginUser, Ret, IsActive);
        }
        catch (Exception ee)
        {
            throw;
        }
        finally
        {
            IDBAl = null;
        }

        return dTable;
    }
コード例 #8
0
 /// <summary>
 ///  To edit intructional designer details
 /// </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 InsID;
     InstructionalDesignerBAL InstructionalDesignerBAL = new InstructionalDesignerBAL();
     LinkButton lblIsActive = (GrdInsDes.Rows[Idx].FindControl("lnkEdit") as LinkButton);
     Label lblStatus = (GrdInsDes.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";
         }
         InsID = Convert.ToInt32(lnk.CommandArgument.ToString());
         lblSelectID.Text = InsID.ToString();
         Session["InsID"] = lblSelectID.Text;
         IntResult = InstructionalDesignerBAL.UpdateInstructionalDesigner(InsID, Status, LoginUser, Ret);
     }
 }
コード例 #9
0
    /// <summary>
    /// To bind Instructional Designer of active status 
    /// </summary>
    /// <param name="IsActive"></param>
    /// <returns></returns>
    protected DataTable InsDesActiveDetails(bool IsActive)
    {
        InstructionalDesignerBAL InstructionalDesignerBAL = new InstructionalDesignerBAL();
        DataTable DtInsDesDet = new DataTable();
        try
        {
            DtInsDesDet = InstructionalDesignerBAL.LoadActiveInstructionalDesigner(LoginUser, Ret, IsActive);
        }
        catch
        {
            throw;
        }
        finally
        {
            InstructionalDesignerBAL = null;
        }

        return DtInsDesDet;
    }
コード例 #10
0
    /// <summary>
    /// To get Instructional Designer details 
    /// </summary>
    /// <returns></returns>
    protected DataTable IDDetails()
    {
        InstructionalDesignerBAL idBAL = new InstructionalDesignerBAL();
        DataTable dTable = new DataTable();
        try
        {
            dTable = idBAL.LoadAllInstructionalDesigner(LoginUser, Ret);
        }
        catch
        {
            throw;
        }
        finally
        {
            idBAL = null;
        }

        return dTable;
    }
コード例 #11
0
    /// <summary>
    ///  To get specific instructional designer details 
    /// </summary>
    /// <param name="InsID"></param>
    /// <returns></returns>
    protected DataTable GetUserDetails(int InsID)
    {
        InstructionalDesignerBAL InstructionalDesignerBAL = new InstructionalDesignerBAL();
        DataTable DtGetUser = new DataTable();
        try
        {
            DtGetUser = InstructionalDesignerBAL.SelectInstructionalDesignerID(InsID, LoginUser, Ret);
        }
        catch
        {
            throw;
        }
        finally
        {
            InstructionalDesignerBAL = null;
        }

        return DtGetUser;
    }
コード例 #12
0
 /// <summary>
 ///  To save instructional designer details
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void btnSave_Click(object sender, EventArgs e)
 {
     InstructionalDesignerBAL InstructionalDesignerBAL = new InstructionalDesignerBAL();
     int UserID = Convert.ToInt32(ddlInsDesUser.SelectedValue.ToString());
     string Status = ddlInsDesStatus.SelectedValue.ToString();
     bool IsActive = true;
     if (Status == "Active")
     {
         IsActive = true;
     }
     else if (Status == "InActive")
     {
         IsActive = false;
     }
     if (btnSave.Text == "Save")
     {
         try
         {
             // 'InsertInstructionalDesigner' is Instructional Designer business Access Layer function called
             // to insert Instructional Designer details
             int Result = InstructionalDesignerBAL.InsertInstructionalDesigner(UserID, IsActive, LoginUser, Ret);
             DtInsDes = IDDetails();
             ViewState["DtInsDes"] = DtInsDes;
             BindInsDes(DtInsDes);
             MsgInsDes.Msg = "Record added successfully";
             MsgInsDes.showmsg();
         }
         catch (Exception ee)
         {
             // Duplicate Entry is catched when inserting Instructional Designer
             if (ee.Message == "Duplicate Entry")
             {
                 MsgInsDes.Msg = "Duplicate Entry!";
                 MsgInsDes.showmsg();
                 ClearInsDes();
             }
         }
         finally
         {
             InstructionalDesignerBAL = null;
         }
     }
 }