Ejemplo n.º 1
0
        private void LoadPersoaneList()
        {
            try
            {
                listTable.Rows.Clear();
                settings = Salaries.Configuration.ModuleConfig.GetSettings();
                UtilitiesDb utilDb = new UtilitiesDb(settings.ConnectionString);
                ddlInvaliditate.DataSource     = utilDb.CreateDataSet("Select InvaliditateID, Nume  from Invaliditati order by Nume");
                ddlInvaliditate.DataValueField = "InvaliditateID";
                ddlInvaliditate.DataTextField  = "Nume";
                ddlInvaliditate.DataBind();

                listTable.Attributes.Add("width", "100%");
                listTable.Style.Add("border", "1px solid #20b2aa");
                listTable.Attributes.Add("cellpadding", "0");
                listTable.Attributes.Add("cellspacing", "1");

                /*
                 *	Changed: Ionel Popa
                 *			- S-au scos coloanele calitate, invaliditate si coeficient
                 * string[] arHeader = {"Nume","Prenume","CNP", "Calitate", "Invaliditate","Coeficient"};
                 * string[] arCols = {"Nume","Prenume","CNP", "Calitat", "Invalid","Coeficient"};
                 */
                string[] arHeader = { "Nume", "Prenume", "CNP" };
                string[] arCols   = { "Nume", "Prenume", "CNP" };

                Salaries.Business.Angajat angajatCurent = new Salaries.Business.Angajat((int)this.AngajatID);
                DataSet ds = angajatCurent.PersoaneInIntretinere();

                //Din cauza scoaterii coloanelor de mai sus se scoate si acest coeficient
                //this.lCoefTotalPersIntret.Text="Coeficientul pt toate persoanele aflate in intretinere este: "+angajatCurent.CoefTotalPtPersInIntretinere;

                ListTable objListTable = new ListTable(listTable, ds, arHeader, arCols);
                objListTable.textForEmptyDataSet = "Nu exista nici o persoana in intretinerea angajatului!";

                string[] ar_OnClickParam = { "ID", "Nume", "Prenume", "CNP", "Calitate", "Invaliditate", "Coeficient" };

                string[] ar_OnClickParamType = new string[ar_OnClickParam.Length];
                for (int i = 0; i < ar_OnClickParamType.Length; i++)
                {
                    ar_OnClickParamType[i] = "dataset";
                }


                objListTable.OnclickParams     = ar_OnClickParam;
                objListTable.OnclickParamsType = ar_OnClickParamType;
                objListTable.OnclickJSMethod   = "SelectPersoana";

                objListTable.DrawListTable();
            }
            catch (Exception ex)
            {
                litError.Text  = "The following error occurred: <br>";
                litError.Text += ex.Message;
            }
        }