示例#1
0
 public BEPolicies SelectAllInactive()
 {
     BEPolicies ds = new BEPolicies();
     DAPolicies da = new DAPolicies();
     da.SelectAllInactive(ds.tbl_Policies);
     return ds;
 }
示例#2
0
        public BEPolicies SelectActiveByPoliciesTypeID(int PoliciesTypeID)
        {
            BEPolicies ds = new BEPolicies();
            DAPolicies da = new DAPolicies();

            da.SelectActiveByPoliciesTypeID(PoliciesTypeID, ds.tbl_Policies);
            return ds;
        }
示例#3
0
        public BEPolicies SelectActiveByIDWithROColumns(int PoliciesID)
        {
            BEPolicies ds = new BEPolicies();
            DAPolicies da = new DAPolicies();

            da.SelectActiveByIDWithROColumns(PoliciesID, ds.tbl_Policies);
            return ds;
        }
示例#4
0
        public BEPolicies SelectByID(int PoliciesID)
        {
            BEPolicies ds = new BEPolicies();
            DAPolicies da = new DAPolicies();

            da.SelectByID(PoliciesID.ToString(), ds.tbl_Policies);
            return ds;
        }
示例#5
0
        private DataView GetData()
        {
            BPPolicies bp = new BPPolicies();
            DSPolicies = bp.SelectByPoliciesTypeID(PoliciesTypeID);

            DSPolicies.tbl_Policies.DefaultView.Sort = DSPolicies.tbl_Policies.PoliciesDateColumn.ColumnName + " desc";

            DSPolicies.tbl_Policies.DefaultView.RowFilter = RowFilter("PoliciesTitle", ((LinkButton)rptLetters.Items[0].FindControl("lnkLetter")).CommandName, "PoliciesActive", lstActive.SelectedValue);
            return DSPolicies.tbl_Policies.DefaultView;

        }
示例#6
0
        private void BindTitle()
        {
            BPPoliciesTypes bp = new BPPoliciesTypes();
            DSPolicies = bp.SelectPoliciesTypeByID(PoliciesTypeID);

            if (DSPolicies.tbl_PoliciesTypes.Count > 0)
            {
                BEPolicies.tbl_PoliciesTypesRow typeRow = DSPolicies.tbl_PoliciesTypes[0];
                lblTitle.Text = "Browse " + typeRow.PoliciesTypeName + "s";
                btnAdd.Text = "Add New";
            }
        }
示例#7
0
 public void Update(BEPolicies ds)
 {
     DAPolicies da = new DAPolicies();
     da.Update(ds.tbl_Policies);
 }
示例#8
0
        public BEPolicies SelectRecentPoliciesItemsWithROColumns()
        {
            BEPolicies ds = new BEPolicies();
            DAPolicies da = new DAPolicies();

            da.SelectRecentPoliciesItemsWithROColumns(ds.tbl_Policies);
            return ds;
        }
示例#9
0
        private void SavePoliciesInfo()
        {
            bool isNew = false;
            BPPolicies bp = new BPPolicies();
            BEPolicies dsPolicies = new BEPolicies();
            BEPolicies.tbl_PoliciesRow Policies = null;

            if (PoliciesID > 0)
            {
                dsPolicies = bp.SelectByID(PoliciesID);
                Policies = dsPolicies.tbl_Policies.FindByPoliciesID(PoliciesID);
            }

            if (Policies == null)
            {
                Policies = dsPolicies.tbl_Policies.Newtbl_PoliciesRow();
                isNew = true;
            }

            Policies.PoliciesTitle = txtPoliciesTitle.Text.Trim();

            if (txtPoliciesTitleFR.Text.Trim() != "")
                Policies.PoliciesTitleFR = txtPoliciesTitleFR.Text.Trim();
            else
                Policies.SetPoliciesTitleFRNull();

            if (dtPoliciesDate.Date != dtPoliciesDate.MinDate)
                Policies.PoliciesDate = dtPoliciesDate.Date;
            else
                Policies.SetPoliciesDateNull();

            if (txtPoliciesDescription.Text.Trim() != "")
                Policies.PoliciesDescription = txtPoliciesDescription.Text.Trim();
            else
                Policies.SetPoliciesDescriptionNull();

            if (txtPoliciesDescriptionFR.Text.Trim() != "")
                Policies.PoliciesDescriptionFR = txtPoliciesDescriptionFR.Text.Trim();
            else
                Policies.SetPoliciesDescriptionFRNull();

            if (docPoliciesDocument.SelectedDocument > 0)
                Policies.PoliciesDocumentID = docPoliciesDocument.SelectedDocument;
            else
                Policies.SetPoliciesDocumentIDNull();

            if (docPoliciesDocumentFR.SelectedDocument > 0)
                Policies.PoliciesDocumentIDFR = docPoliciesDocumentFR.SelectedDocument;
            else
                Policies.SetPoliciesDocumentIDFRNull();


            if (chkPoliciesActive.Checked)
            {
                Policies.PoliciesActive = true;
            }
            else
            {
                Policies.PoliciesActive = false;
            }

            Policies.PoliciesActiveFR = chkPoliciesActiveFR.Checked;

            Policies.DateModified = DateTime.Now;
            Policies.ModifiedByAdminID = Convert.ToInt32(PageUserID);

            if (isNew)
            {
                Policies.PoliciesTypeID = PoliciesTypeID;
                Policies.DateCreated = DateTime.Now;
                dsPolicies.tbl_Policies.Addtbl_PoliciesRow(Policies);
            }

            bp.Update(dsPolicies);
            //PoliciesID = Policies.PoliciesID;
            //SaveLinkInfo(isNew);

        }