コード例 #1
0
 //////////////////////////////
 #region id-uri pentru tip absenta
 private void GetIdTipAbsente()
 {
     //tip absenta - cod absenta
     Salaries.Business.NomenclatorTipAbsente tipAbs = new Salaries.Business.NomenclatorTipAbsente();
     Salaries.Data.TipAbsente[] sirTipuri           = tipAbs.GetDetaliiTipuriAbsente();
     foreach (Salaries.Data.TipAbsente item in sirTipuri)
     {
         if (item.CodAbsenta.Equals("CM"))
         {
             idCM = item.TipAbsentaID;
         }
         if (item.CodAbsenta.Equals("CCM"))
         {
             idCCM = item.TipAbsentaID;
         }
         if (item.CodAbsenta.Equals("CO"))
         {
             idCO = item.TipAbsentaID;
         }
         if (item.CodAbsenta.Equals("COA"))
         {
             idCOA = item.TipAbsentaID;
         }
     }
 }
コード例 #2
0
        private void Page_Load(object sender, System.EventArgs e)
        {
            CreateJavascriptVar();
            lunaID = this.GetCurrentMonth();
            Salaries.Business.Luni l = new Salaries.Business.Luni(this.GetAngajator(), lunaID);
            this.dataStartLunaActiva = l.Data;
            this.dataEndLunaActiva   = dataStartLunaActiva.AddMonths(1).AddDays(-1);
            angajatorID = this.GetAngajator();
            Salaries.Business.Luni salLuni = new Salaries.Business.Luni(angajatorID);
            lunaActiva = salLuni.GetLunaActiva().LunaId;

            /*if (ButtonImport.Value.Equals("Import pontaj"))
             *      tdTemplate.InnerHtml = "<a target=_blank href='Templates\\TemplatePontaj.xls'>template pontaj</a>";
             * else
             *      tdTemplate.InnerHtml = "<a target=_blank href='Templates\\TemplateSituatieLunara.xls'>template situatie lunara</a>";*/
            actionImportDelegatiiLuna = ((System.Web.UI.HtmlControls.HtmlInputHidden)Page.FindControl("ActionImportDelegatiiLunaValue")).Value;

            Salaries.Business.NomenclatorTipAbsente tipAbs = new Salaries.Business.NomenclatorTipAbsente();
            sirTipuri = tipAbs.GetDetaliiTipuriAbsente();

            //user-ul loginat
            user = new WindowsPrincipal(WindowsIdentity.GetCurrent());

            if (!IsPostBack)
            {
                lblMesajImport.Text = "";
            }
            else
            {
            }
            System.IO.StreamWriter swRez = new System.IO.StreamWriter(Server.MapPath("Templates\\RezultateImport.txt"), false);
            swRez.WriteLine();
            swRez.Close();

            GetIdTipAbsente();
            HandleActions();
        }