public void LoadOrganisation()
    {
        try
        {
            Session["DocOrgList"] = BLLOrganization.GetOrganizationNameList();
            this.drpOrganisation_rqd.DataSource     = (List <ATTOrganization>)Session["DocOrgList"];
            this.drpOrganisation_rqd.DataTextField  = "OrgName";
            this.drpOrganisation_rqd.DataValueField = "OrgId";
            this.drpOrganisation_rqd.DataBind();

            ListItem a = new ListItem();
            a.Selected = true;
            a.Text     = "Select Organisation";
            a.Value    = "0";
            drpOrganisation_rqd.Items.Insert(0, a);

            Session["DocUnitList"] = BLLOrganizationUnit.GetOrganizationUnits(null, null);

            //Session["DocUnitList"] = BLLUnit.GetUnitList(null, null);
        }
        catch (Exception ex)
        {
            lblStatus.Text = ex.Message;
        }
    }
示例#2
0
    protected void lstOrganization_SelectedIndexChanged(object sender, EventArgs e)
    {
        try
        {
            List <ATTOrganizationCaseType> lstOrgCaseType = BLLOrganizationCaseType.GetOrgCaseType(int.Parse(lstOrganization.SelectedValue), null, "Y", 1, 1, 1, 1);

            lstCaseTypes.DataSource     = lstOrgCaseType;
            lstCaseTypes.DataTextField  = "CaseTypeName";
            lstCaseTypes.DataValueField = "CaseTypeID";
            lstCaseTypes.DataBind();

            List <ATTOrganizationUnit> OrgUnitList = BLLOrganizationUnit.GetOrganizationUnits(int.Parse(lstOrganization.SelectedValue), null);

            OrgUnitList.RemoveAll(delegate(ATTOrganizationUnit attOU)
            {
                return(attOU.UnitType != "C");
            });

            grdOrgUnits.DataSource = OrgUnitList;
            grdOrgUnits.DataBind();
        }
        catch (Exception ex)
        {
            lblStatusMessage.Text = ex.Message;
            programmaticModalPopup.Show();
        }
    }
示例#3
0
    public void LoadOrganizationUnit()
    {
        try
        {
            Session["PoOrgRetUnits"] = BLLOrganizationUnit.GetOrganizationUnits("ST", 9);

            if (Session["PoOrgRetUnits"] != null)
            {
                ddlUnit_srch.DataSource     = Session["PoOrgRetUnits"];
                ddlUnit_srch.DataTextField  = "UnitName";
                ddlUnit_srch.DataValueField = "UnitID";
                ddlUnit_srch.DataBind();

                ListItem a = new ListItem();
                a.Selected = true;
                a.Text     = "----छान्नुहोस----";
                a.Value    = "0";
                ddlUnit_srch.Items.Insert(0, a);
            }
        }
        catch (Exception ex)
        {
            this.lblStatusMessageTitle.Text = "Error Status";
            this.lblStatusMessage.Text      = ex.Message;
            this.programmaticModalPopup.Show();
        }
    }
    private List <ATTOrganizationUnit> GetOrgUnits(int organisationID)
    {
        List <ATTOrganizationUnit> lst = BLLOrganizationUnit.GetOrganizationUnits(organisationID, null);
        ATTOrganizationUnit        obj = new ATTOrganizationUnit();

        obj.UnitName = " छान्नुहोस् ";
        obj.UnitID   = -2;
        lst.Insert(0, obj);

        return(lst);
    }
    void LoadUnit()
    {
        int orgid = int.Parse(Session["Orgid"].ToString());
        List <ATTOrganizationUnit> LSTOrgUnit = BLLOrganizationUnit.GetOrganizationUnits(orgid, null);

        ddlUnit.DataSource = LSTOrgUnit;
        Session["OrgUnit"] = LSTOrgUnit;
        LSTOrgUnit.Insert(0, new ATTOrganizationUnit(0, 0, "छान्नुहोस्"));
        ddlUnit.DataTextField  = "UnitName";
        ddlUnit.DataValueField = "UnitID";
        ddlUnit.DataBind();
    }
 private void LoadOrganizationUnit(int orgId)
 {
     try
     {
         List <ATTOrganizationUnit> LSTOrgUnit = BLLOrganizationUnit.GetOrganizationUnits(orgId, null);
         LSTOrgUnit.Insert(0, new ATTOrganizationUnit(0, 0, "छान्नुहोस"));
         this.ddlorgUnit.DataSource     = LSTOrgUnit;
         this.ddlorgUnit.DataTextField  = "UnitName";
         this.ddlorgUnit.DataValueField = "UnitID";
         this.ddlorgUnit.DataBind();
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
 void LoadOrganizationUnits()
 {
     try
     {
         this.ddlOrgUnits.Items.Add("छान्नुहोस");
         List <ATTOrganizationUnit> lstOrgUnits = BLLOrganizationUnit.GetOrganizationUnits(((ATTUserLogin)Session["Login_User_Detail"]).OrgID, null);
         this.ddlOrgUnits.DataSource     = lstOrgUnits;
         this.ddlOrgUnits.DataTextField  = "UNITNAME";
         this.ddlOrgUnits.DataValueField = "UNITID";
         this.ddlOrgUnits.DataBind();
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
 protected void ddlOrg_SelectedIndexChanged(object sender, EventArgs e)
 {
     try
     {
         List <ATTOrganizationUnit> lst = BLLOrganizationUnit.GetOrganizationUnits(int.Parse(this.ddlOrg.SelectedValue), null);
         lst.Insert(0, new ATTOrganizationUnit(-1, -1, "--- शाखा छन्नुहोस् ---"));
         this.ddlUnit.DataSource     = lst;
         this.ddlUnit.DataTextField  = "UnitName";
         this.ddlUnit.DataValueField = "UnitID";
         this.ddlUnit.DataBind();
     }
     catch (Exception ex)
     {
         this.lblStatusMessage.Text = ex.Message;
         this.programmaticModalPopup.Show();
     }
 }
 void LoadOrganizationUnit()
 {
     try
     {
         List <ATTOrganizationUnit> lst = BLLOrganizationUnit.GetOrganizationUnits(int.Parse(this.ddlOrganization.SelectedValue), null);
         lst.Insert(0, new ATTOrganizationUnit(-1, -1, "--- शाखा ---"));
         this.ddlUnit.DataSource     = lst;
         this.ddlUnit.DataTextField  = "UnitName";
         this.ddlUnit.DataValueField = "UnitID";
         this.ddlUnit.DataBind();
     }
     catch (Exception ex)
     {
         this.lblStatusMessage.Text = ex.Message;
         this.programmaticModalPopup.Show();
     }
 }
 void LoadOrganizationUnits()
 {
     try
     {
         this.ddlOrgUnits_Rqd.Items.Add("छान्नुहोस");
         List <ATTOrganizationUnit> lstOrgUnits = BLLOrganizationUnit.GetOrganizationUnits(((ATTUserLogin)Session["Login_User_Detail"]).OrgID, null);
         this.ddlOrgUnits_Rqd.DataSource     = lstOrgUnits;
         this.ddlOrgUnits_Rqd.DataTextField  = "UNITNAME";
         this.ddlOrgUnits_Rqd.DataValueField = "UNITID";
         this.ddlOrgUnits_Rqd.DataBind();
     }
     catch (Exception ex)
     {
         this.lblStatusMessage.Text = ex.Message;
         this.programmaticModalPopup.Show();
     }
 }
    void LoadUnit()
    {
        try
        {
            List <ATTOrganizationUnit> lst = BLLOrganizationUnit.GetOrganizationUnits(((ATTUserLogin)Session["Login_User_Detail"]).OrgID, null);

            lst.Insert(0, new ATTOrganizationUnit(0, 0, "-- शाखा छान्नुहोस् --"));
            DDLUnit.DataSource     = lst;
            DDLUnit.DataTextField  = "UnitName";
            DDLUnit.DataValueField = "UnitID";
            DDLUnit.DataBind();
        }
        catch (Exception ex)
        {
            lblStatusMessage.Text = ex.Message;
            programmaticModalPopup.Show();
        }
    }
    void LoadOrganizationUnits(int intOrgID)
    {
        try
        {
            List <ATTOrganizationUnit> lstOrganizationUnits = BLLOrganizationUnit.GetOrganizationUnits(intOrgID, null);
            Session["OrganizationUnits"] = lstOrganizationUnits;

            //this.ddlTransOrgUnit.Items.Insert(0, new ListItem("छान्नुहोस्", "0"));
            lstOrganizationUnits.Insert(0, new ATTOrganizationUnit(0, 0, "छान्नुहोस्"));
            this.ddlTransOrgUnit.DataSource     = lstOrganizationUnits;
            this.ddlTransOrgUnit.DataTextField  = "UNITNAME";
            this.ddlTransOrgUnit.DataValueField = "UNITID";
            this.ddlTransOrgUnit.DataBind();
        }
        catch (Exception ex)
        {
            this.lblStatusMessage.Text = ex.Message;
            this.programmaticModalPopup.Show();
        }
    }
    protected void btnSave_Click(object sender, EventArgs e)
    {
        List <ATTOrganizationUnit> OrgUnitList = OrganisationUnit;

        if (OrgUnitList.Count == 0)
        {
            this.lblStatusMessage.Text = "**No Data To Save";
            this.programmaticModalPopup.Show();
            return;
        }
        try
        {
            if (BLLOrganizationUnit.SaveOrganizationUnit(OrgUnitList))
            {
                this.lblStatusMessage.Text = "Organization Unit Successfully Saved.";
                this.programmaticModalPopup.Show();
            }
            List <ATTOrganizationUnit> LSTOrgUnits = BLLOrganizationUnit.GetOrganizationUnits(int.Parse(Session["OrgID"].ToString()), null);
            this.lstOrgUnits.DataSource = LSTOrgUnits;
            this.lstOrgUnits.DataBind();
            ClearControls("Submit");
            if (this.lstOrgUnits.SelectedIndex == -1)
            {
                this.lblStatusMessage.Text = "Unit Details Saved Successfully.";
                this.programmaticModalPopup.Show();
            }
            else
            {
                this.lblStatusMessage.Text = "Unit Details Updated Successfully .";
                this.programmaticModalPopup.Show();
            }
            this.txtUnitName_Rqd.Focus();
        }
        catch (Exception ex)
        {
            this.lblStatusMessage.Text = ex.Message;
            this.programmaticModalPopup.Show();
        }
    }
示例#14
0
    void LoadOrgSections()
    {
        try
        {
            List <ATTOrganizationUnit> lstOrgSections = BLLOrganizationUnit.GetOrganizationUnits(int.Parse(DDLOrg.SelectedValue), null);

            List <ATTOrganizationUnit> listOrgSec = lstOrgSections.FindAll(delegate(ATTOrganizationUnit att)
            {
                return(att.UnitType == "C");
            });
            listOrgSec.Insert(0, new ATTOrganizationUnit(0, 0, "शाखा छान्नुस्"));
            DDLSection.DataSource     = listOrgSec;
            DDLSection.DataTextField  = "UnitName";
            DDLSection.DataValueField = "UnitID";
            DDLSection.DataBind();
        }
        catch (Exception ex)
        {
            lblStatusMessage.Text = ex.Message;
            programmaticModalPopup.Show();
        }
    }
    public void LoadUnit()
    {
        try
        {
            // Session["DocSearchUnitList"] = BLLUnit.GetUnitList(null, null);
            //GetOrganizationUnits
            Session["DocSearchUnitList"] = BLLOrganizationUnit.GetOrganizationUnits(null, null);
            this.drpUnit.DataSource      = (List <ATTOrganizationUnit>)Session["DocSearchUnitList"];
            this.drpUnit.DataTextField   = "UnitName";
            this.drpUnit.DataValueField  = "UnitID";
            this.drpUnit.DataBind();

            ListItem a = new ListItem();
            a.Selected = true;
            a.Text     = "Select Unit";
            a.Value    = "0";
            drpUnit.Items.Insert(0, a);
        }
        catch (Exception ex)
        {
            this.lblStatus.Text = ex.Message;
        }
    }
示例#16
0
    void LoadOrganizationUnit()
    {
        List <ATTOrganizationUnit> LSTOrgUnit = BLLOrganizationUnit.GetOrganizationUnits(null, null);

        Session["OrgUnitList"] = LSTOrgUnit;
    }