コード例 #1
0
    /// <summary>
    /// To get Stakeholder Relationship Manager having active status
    /// </summary>
    /// <param name="IsActive"></param>
    /// <returns></returns>
    protected DataTable SRMActiveDetails(bool IsActive)
    {
        StakeholderRelationshipManagerBAL StakeholderRelationshipManagerBAL = new StakeholderRelationshipManagerBAL();
        DataTable DtSRMAct = new DataTable();

        try
        {
            DtSRMAct = StakeholderRelationshipManagerBAL.LoadActiveStakeholderRelationshipManager(LoginUser, Ret, IsActive);
        }
        catch
        {
            throw;
        }
        finally
        {
            StakeholderRelationshipManagerBAL = null;
        }
        return(DtSRMAct);
    }
コード例 #2
0
    /// <summary>
    /// To get Stakeholder Relationship Manager having active status
    /// </summary>
    /// <returns></returns>
    protected DataTable SRMDetails()
    {
        StakeholderRelationshipManagerBAL StakeholderRelationshipManagerBAL = new StakeholderRelationshipManagerBAL();
        DataTable DtSRMDet = new DataTable();

        try
        {
            DtSRMDet = StakeholderRelationshipManagerBAL.LoadAllStakeholderRelationshipManager(LoginUser, Ret);
        }
        catch
        {
            throw;
        }
        finally
        {
            StakeholderRelationshipManagerBAL = null;
        }
        return(DtSRMDet);
    }
コード例 #3
0
    protected DataTable SRMActiveDetails(bool IsActive)
    {
        StakeholderRelationshipManagerBAL srmBAL = new StakeholderRelationshipManagerBAL();
        DataTable dTable = new DataTable();

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

        return(dTable);
    }
コード例 #4
0
    /// <summary>
    /// To save and update Stakeholder Relationship Manager details
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void btnSave_Click(object sender, EventArgs e)
    {
        StakeholderRelationshipManagerBAL StakeholderRelationshipManagerBAL = new StakeholderRelationshipManagerBAL();
        int    UserID   = Convert.ToInt32(ddlSRMUser.SelectedValue.ToString());
        string Status   = ddlSRMStatus.SelectedValue.ToString();
        bool   IsActive = true;

        if (Status == "Active")
        {
            IsActive = true;
        }
        else if (Status == "InActive")
        {
            IsActive = false;
        }
        if (btnSave.Text == "Save")
        {
            try
            {
                int Result = StakeholderRelationshipManagerBAL.InsertStakeholderRelationshipManager(UserID, IsActive, LoginUser, Ret);
                DtSRM = SRMDetails();
                ViewState["DtSRM"] = DtSRM;
                BindSRM(DtSRM);
                MsgSRM.Msg = "Record added successfully";
                MsgSRM.showmsg();
            }
            catch (Exception ee)
            {
                if (ee.Message == "Duplicate Entry")
                {
                    MsgSRM.Msg = "Stakeholder Relationship Manager already exists";
                    MsgSRM.showmsg();
                    ClearSRM();
                }
            }
            finally
            {
                StakeholderRelationshipManagerBAL = null;
            }
        }
    }
コード例 #5
0
    protected DataTable SRMActiveDetails(bool IsActive)
    {
        StakeholderRelationshipManagerBAL srmBAL = new StakeholderRelationshipManagerBAL();
        DataTable dTable = new DataTable();
        try
        {
            dTable = srmBAL.LoadActiveStakeholderRelationshipManager(LoginUser, Ret, IsActive);
        }
        catch (Exception ee)
        {
            throw;
        }
        finally
        {
            srmBAL = null;
        }

        return dTable;
    }
 /// <summary>
 /// To get Stakeholder Relationship Manager having active status
 /// </summary>
 /// <returns></returns>
 protected DataTable SRMDetails()
 {
     StakeholderRelationshipManagerBAL StakeholderRelationshipManagerBAL = new StakeholderRelationshipManagerBAL();
     DataTable DtSRMDet = new DataTable();
     try
     {
         DtSRMDet = StakeholderRelationshipManagerBAL.LoadAllStakeholderRelationshipManager(LoginUser, Ret);
     }
     catch
     {
         throw;
     }
     finally
     {
         StakeholderRelationshipManagerBAL = null;
     }
     return DtSRMDet;
 }
 /// <summary>
 /// To get Stakeholder Relationship Manager having active status
 /// </summary>
 /// <param name="IsActive"></param>
 /// <returns></returns>
 protected DataTable SRMActiveDetails(bool IsActive)
 {
     StakeholderRelationshipManagerBAL StakeholderRelationshipManagerBAL = new StakeholderRelationshipManagerBAL();
     DataTable DtSRMAct = new DataTable();
     try
     {
         DtSRMAct = StakeholderRelationshipManagerBAL.LoadActiveStakeholderRelationshipManager(LoginUser, Ret, IsActive);
     }
     catch
     {
         throw;
     }
     finally
     {
         StakeholderRelationshipManagerBAL = null;
     }
     return DtSRMAct;
 }
 /// <summary>
 /// To edit Stakeholder Relationship Manager 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 SRMID;
     StakeholderRelationshipManagerBAL StakeholderRelationshipManagerBAL = new StakeholderRelationshipManagerBAL();
     LinkButton lblIsActive = (GrdSRM.Rows[Idx].FindControl("lnkEdit") as LinkButton);
     Label lblStatus = (GrdSRM.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";
         }
         SRMID = Convert.ToInt32(lnk.CommandArgument.ToString());
         lblSelectID.Text = SRMID.ToString();
         Session["SRMID"] = lblSelectID.Text;
         IntResult = StakeholderRelationshipManagerBAL.UpdateStakeholderRelationshipManager(SRMID, Status, LoginUser, Ret);
     }
 }
 /// <summary>
 ///  To get specific Stakeholder Relationship Manager details 
 /// </summary>
 /// <param name="SRMID"></param>
 /// <returns></returns>
 protected DataTable GetUserDetails(int SRMID)
 {
     StakeholderRelationshipManagerBAL StakeholderRelationshipManagerBAL = new StakeholderRelationshipManagerBAL();
     DataTable DtGetUser = new DataTable();
     try
     {
         DtGetUser = StakeholderRelationshipManagerBAL.SelectStakeholderRelationshipManagerID(SRMID, LoginUser, Ret);
     }
     catch
     {
         throw;
     }
     finally
     {
         StakeholderRelationshipManagerBAL = null;
     }
     return DtGetUser;
 }
 /// <summary>
 /// To save and update Stakeholder Relationship Manager details
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void btnSave_Click(object sender, EventArgs e)
 {
     StakeholderRelationshipManagerBAL StakeholderRelationshipManagerBAL = new StakeholderRelationshipManagerBAL();
     int UserID = Convert.ToInt32(ddlSRMUser.SelectedValue.ToString());
     string Status = ddlSRMStatus.SelectedValue.ToString();
     bool IsActive = true;
     if (Status == "Active")
     {
         IsActive = true;
     }
     else if (Status == "InActive")
     {
         IsActive = false;
     }
     if (btnSave.Text == "Save")
     {
         try
         {
             int Result = StakeholderRelationshipManagerBAL.InsertStakeholderRelationshipManager(UserID, IsActive, LoginUser, Ret);
             DtSRM = SRMDetails();
             ViewState["DtSRM"] = DtSRM;
             BindSRM(DtSRM);
             MsgSRM.Msg = "Record added successfully";
             MsgSRM.showmsg();
         }
         catch (Exception ee)
         {
          if (ee.Message == "Duplicate Entry")
             {
                 MsgSRM.Msg = "Stakeholder Relationship Manager already exists";
                 MsgSRM.showmsg();
                 ClearSRM();
             }
         }
         finally
         {
             StakeholderRelationshipManagerBAL = null;
         }
     }
 }