Ejemplo n.º 1
0
 protected bool DataOk()
 {
     if (rdcTipoDisp.SelectedValue == "")
     {
         RadNotification1.Text = String.Format("<b>{0}</b><br/>{1}",
                                               (string)GetGlobalResourceObject("ResourceLainsaSci", "Warning"),
                                               (string)GetGlobalResourceObject("ResourceLainsaSci", "NcTipoDispositivo"));
         RadNotification1.Show();
         return(false);
     }
     if (rdcFuncion.SelectedValue == "")
     {
         RadNotification1.Text = String.Format("<b>{0}</b><br/>{1}",
                                               (string)GetGlobalResourceObject("ResourceLainsaSci", "Warning"),
                                               (string)GetGlobalResourceObject("ResourceLainsaSci", "NcFuncion"));
         RadNotification1.Show();
         return(false);
     }
     if (rdcEstado.SelectedValue == "")
     {
         RadNotification1.Text = String.Format("<b>{0}</b><br/>{1}",
                                               (string)GetGlobalResourceObject("ResourceLainsaSci", "Warning"),
                                               (string)GetGlobalResourceObject("ResourceLainsaSci", "NcEstado"));
         RadNotification1.Show();
         return(false);
     }
     return(true);
 }
 protected void Button1_submit_Click(object sender, EventArgs e)
 {
     try
     {
         List <RadRadioButtonList> allControls = new List <RadRadioButtonList>();
         GetControlList <RadRadioButtonList>(Page.Controls, allControls);
         if (allControls.Count != 0)
         {
             for (int i = 0; i < allControls.Count; i++)
             {
                 int j = i + 1;
                 RadRadioButtonList radioButton  = (RadRadioButtonList)accordion.FindControl("Radio" + j);
                 String             answer_value = radioButton.SelectedValue;
                 if (answer_value == "" || answer_value == null)
                 {
                     RadNotification1.Text = "One or more questions is not answered";
                     RadNotification1.Show();
                     return;
                 }
                 else
                 {
                     answer_id_list.AddLast(answer_value);
                 }
             }
             calculateScore();
         }
     }
     catch (Exception ex)
     {
         var message = new JavaScriptSerializer().Serialize(ex.Message.ToString());
         var script  = string.Format("alert({0});", message);
         ScriptManager.RegisterClientScriptBlock(Page, Page.GetType(), "", script, true);
     }
 }
Ejemplo n.º 3
0
 string caller = ""; // who's calling the grid form
 #endregion
 #region Init, load, unload events
 protected void Page_Init(object sender, EventArgs e)
 {
     // it gets an appropiate context (LainsaSciCTX -> web.config)
     ctx = new LainsaSci("LainsaSciCTX");
     // verify if a Usuario is logged
     usuario = CntWinWeb.IsSomeoneLogged(this, ctx);
     if (usuario == null)
     {
         Response.Redirect("Default.aspx");
     }
     else
     {
         Session["UsuarioId"] = usuario.UsuarioId;
     }
     // si llega aquí está autorizado
     permiso = CntLainsaSci.GetPermiso(usuario.GrupoUsuario, "dispositivogrid", ctx);
     //usuario.GrupoTrabajo = CntLainsaSci.GetGrupoTrabajo(1, ctx);
     if (permiso == null)
     {
         RadNotification1.Text = String.Format("<b>{0}</b><br/>{1}",
                                               (string)GetGlobalResourceObject("ResourceLainsaSci", "Warning"),
                                               (string)GetGlobalResourceObject("ResourceLainsaSci", "NoPermissionsAssigned"));
         RadNotification1.Show();
         RadAjaxManager1.ResponseScripts.Add("closeWindow();");
     }
     CntWinWeb.TranslateRadGridFilters(RadGrid1);
     if (Request.QueryString["InTab"] != null)
     {
         mode = Request.QueryString["InTab"];
     }
     if (Request.QueryString["Caller"] != null)
     {
         caller = Request.QueryString["Caller"];
     }
     if (Request.QueryString["DispositivoId"] != null)
     {
         dispositivo = CntLainsaSci.GetDispositivo(int.Parse(Request.QueryString["DispositivoId"]), ctx);
         if (dispositivo != null)
         {
             RadGrid1.Columns.FindByDataField("dispositivo.Nombre").Visible = false;
         }
     }
     if (Request.QueryString["ProgramaId"] != null)
     {
         programa = CntLainsaSci.GetPrograma(int.Parse(Request.QueryString["ProgramaId"]), ctx);
         if (programa != null)
         {
             // Modificar la altura del grid para que quepan otros
             RadGrid1.PageSize       = 7;
             RadGrid1.ShowGroupPanel = false;
         }
     }
     if (Request.QueryString["InFrame"] != null)
     {
         if (Request.QueryString["InFrame"] == "S")
         {
             crear = false;
         }
     }
 }
Ejemplo n.º 4
0
 string caller   = "";   // who calls the form
 #endregion
 #region Init, load, unload events
 protected void Page_Init(object sender, EventArgs e)
 {
     // it gets an appropiate context (LainsaSciCTX -> web.config)
     ctx = new LainsaSci("LainsaSciCTX");
     // verify if a Usuario is logged
     usuario = CntWinWeb.IsSomeoneLogged(this, ctx);
     if (usuario == null)
     {
         Response.Redirect("Default.aspx");
     }
     else
     {
         Session["UsuarioId"] = usuario.UsuarioId;
     }
     //
     permiso = CntLainsaSci.GetPermiso(usuario.GrupoUsuario, "repositoriotmpform", ctx);
     if (permiso == null)
     {
         RadNotification1.Text = String.Format("<b>{0}</b><br/>{1}",
                                               (string)GetGlobalResourceObject("ResourceLainsaSci", "Warning"),
                                               (string)GetGlobalResourceObject("ResourceLainsaSci", "NoPermissionsAssigned"));
         RadNotification1.Show();
         RadAjaxManager1.ResponseScripts.Add("closeWindow();");
     }
     if (Request.QueryString["Caller"] != null)
     {
         caller = Request.QueryString["Caller"];
     }
     // control de skin
     if (Session["Skin"] != null)
     {
         RadSkinManager1.Skin = Session["Skin"].ToString();
     }
 }
Ejemplo n.º 5
0
 protected void btnAccept_Click(object sender, ImageClickEventArgs e)
 {
     try
     {
         if (!DataOk())
         {
             return;
         }
         if (newRecord)
         {
             usuarioextranet = new UsuarioExtranet();
         }
         UnloadData(usuarioextranet);
         if (newRecord)
         {
             ctx.Add(usuarioextranet);
         }
         ctx.SaveChanges();
         //if (newRecord)
         //    RadAjaxManager1.ResponseScripts.Add(String.Format("closeWindowRefreshGrid('{0}', 'new');", caller));
         //else
         //{
         //    RadAjaxManager1.ResponseScripts.Add(String.Format("closeWindowRefreshGrid('{0}', 'edit');", caller));
         //    RadAjaxManager1.ResponseScripts.Add(String.Format("MyAlert('{0}');", caller));
         //}
         RadNotification1.Text = "Sus datos han sido guardados haga clic en cualquier elemento del árbol a su izquierda para continuar";
         RadNotification1.Show();
     }
     catch (Exception ex)
     {
         ControlDeError(ex);
     }
 }
Ejemplo n.º 6
0
 protected void Page_Init(object sender, EventArgs e)
 {
     // it gets an appropiate context (LainsaSciCTX -> web.config)
     ctx = new LainsaSci("LainsaSciCTX");
     // verify if a Usuario is logged
     usuario = CntWinWeb.IsSomeoneLogged(this, ctx);
     if (usuario == null)
     {
         Response.Redirect("Default.aspx");
     }
     else
     {
         Session["UsuarioId"] = usuario.UsuarioId;
     }
     //
     // si llega aquí está autorizado
     permiso = CntLainsaSci.GetPermiso(usuario.GrupoUsuario, "Instalaciongrid", ctx);
     if (permiso == null)
     {
         RadNotification1.Text = String.Format("<b>{0}</b><br/>{1}",
                                               (string)GetGlobalResourceObject("ResourceLainsaSci", "Warning"),
                                               (string)GetGlobalResourceObject("ResourceLainsaSci", "NoPermissionsAssigned"));
         RadNotification1.Show();
         RadAjaxManager1.ResponseScripts.Add("closeWindow();");
     }
     btnAccept.Visible = permiso.Modificar;
     if (Request.QueryString["InTab"] != null)
     {
         inTab = Request.QueryString["InTab"];
     }
     // Si esto no va antes de InstalacionID tendrás problemas.
     if (Request.QueryString["Caller"] != null)
     {
         caller = Request.QueryString["Caller"];
         caller = caller.Replace("'", "");
     }
     // Mirar si se ha pasado una empresa
     if (Request.QueryString["EmpresaId"] != null)
     {
         empresa = CntLainsaSci.GetEmpresa(int.Parse(Request.QueryString["EmpresaId"]), ctx);
         CargaEmpresa(empresa);
     }
     // Is it a new record or not?
     if (Request.QueryString["RevisionId"] != null)
     {
         instalacion = CntLainsaSci.GetInstalacion(int.Parse(Request.QueryString["RevisionId"]), ctx);
         LoadData(instalacion);
         this.Title = String.Format("Instalacion: {0}", instalacion.Nombre);
         newRecord  = false;
     }
     else
     {
         CargarEmpresas(null);
     }
     // control de skin
     if (Session["Skin"] != null)
     {
         RadSkinManager1.Skin = Session["Skin"].ToString();
     }
 }
Ejemplo n.º 7
0
 void CheckPvMessage()
 {
     if (Context.User.Identity.IsAuthenticated)
     {
         using (Service1Client proxy = new Service1Client())
         {
             try
             {
                 Guid UserId = proxy.UserNamedenUserIdDon(Context.User.Identity.Name);
                 //Guid UserId = proxy.UserNamedenUserIdDon("hhhhhhhhhhh");
                 List <kal_RecievedPvMessages_Result> OkunmamisMesajlar = proxy.OkunmamisPvtMesajlariDon(UserId).ToList();
                 if (OkunmamisMesajlar.Count > 0)
                 {
                     imgMsgOkunmamis.Visible = true;
                     imgMsgOkunmamis.ToolTip = OkunmamisMesajlar.Count.ToString() + " adet okunmamış özel mesajınız var";
                     lblMessageUyari.Text    = OkunmamisMesajlar.Count + " adet  mesajınız var.";
                     string url = HttpContext.Current.Request.Url.AbsoluteUri;
                     if (url.IndexOf("OzelMesajOku") == -1)
                     {
                         RadNotification1.Text = " <font color='red'>" + OkunmamisMesajlar.Count.ToString() + " adet okunmamış özel mesajınız var.<br>Mesajlarınızı online kullanıcılar kısmının hemen üzerinde yer alan özel mesajlarım linkine tıklayarak okuyabilirsiniz." + "</font>";
                         RadNotification1.Show();
                     }
                 }
             }
             catch (CommunicationException e)
             {
                 proxy.Abort();
             }
         }
     }
 }
Ejemplo n.º 8
0
 string caller = ""; // who's calling the grid form
 #endregion
 #region Init, load, unload events
 protected void Page_Init(object sender, EventArgs e)
 {
     // it gets an appropiate context (LainsaSciCTX -> web.config)
     ctx = new LainsaSci("LainsaSciCTX");
     // verify if a Usuario is logged
     usuario = CntWinWeb.IsSomeoneLogged(this, ctx);
     if (usuario == null)
     {
         Response.Redirect("Default.aspx");
     }
     else
     {
         Session["UsuarioId"] = usuario.UsuarioId;
     }
     // si llega aquí está autorizado
     permiso = CntLainsaSci.GetPermiso(usuario.GrupoUsuario, "Programagrid", ctx);
     if (permiso == null)
     {
         RadNotification1.Text = String.Format("<b>{0}</b><br/>{1}",
                                               (string)GetGlobalResourceObject("ResourceLainsaSci", "Warning"),
                                               (string)GetGlobalResourceObject("ResourceLainsaSci", "NoPermissionsAssigned"));
         RadNotification1.Show();
         RadAjaxManager1.ResponseScripts.Add("closeWindow();");
     }
     CntWinWeb.TranslateRadGridFilters(RadGrid1);
     if (Request.QueryString["Mode"] != null)
     {
         mode = Request.QueryString["Mode"];
     }
     if (Request.QueryString["Caller"] != null)
     {
         caller = Request.QueryString["Caller"];
     }
 }
Ejemplo n.º 9
0
 protected void RadAjaxManager1_AjaxRequest(object sender, AjaxRequestEventArgs e)
 {
     try
     {
         file = new System.IO.FileInfo(lblPath.Text);
         AppDomain.CurrentDomain.SetData("SQLServerCompactEditionUnderWebHosting", true);
         SqlCeConnection conn = GetConnection();
         GetEmpresa(conn);
         // GuardarPrograma(conn);
         GuardarDispositivos(conn);
         GuardarRevisiones(conn);
         ctx.SaveChanges();
         if (conn.State != System.Data.ConnectionState.Closed)
         {
             conn.Close();
         }
         //if (File.Exists(file.FullName))
         //    File.Delete(file.FullName);
     }
     catch (Exception ex)
     {
         RadNotification1.Text = String.Format("<b>{0}</b><br/>{1}",
                                               (string)GetGlobalResourceObject("ResourceLainsaSci", "Warning"),
                                               ex.Message);
         RadNotification1.Show();
     }
 }
Ejemplo n.º 10
0
 protected void Notif()
 {
     RadNotification1.Text  = "Специальность не выбрана.";
     RadNotification1.Title = "Ошибка";
     // RadNotification1.DataBind();
     RadNotification1.Show();
 }
Ejemplo n.º 11
0
        protected void Cancel(object sender, EventArgs e)
        {
            var query = dbContext.tblRequests.Where(x => x.JR_Code == jrcode).FirstOrDefault();

            if (query != null)
            {
                query.IsCancelled = true;

                query.CreationDateTime = DateTime.Now;

                dbContext.Entry(query).State = EntityState.Modified;

                dbContext.SaveChanges();
            }

            RadNotification1.Text = "Requests Successfully Cancelled";

            RadNotification1.Title = "Notification";

            RadNotification1.TitleIcon = string.Empty;

            RadNotification1.ContentIcon = string.Empty;

            RadNotification1.Show();

            Response.Redirect("HomePage.aspx");
        }
Ejemplo n.º 12
0
        protected void Resend(object sender, EventArgs e)
        {
            var signerQuery = dbContext.tblEmailLogs.Where(x => x.JR_Code == jrcode && x.UserRole.Trim() == "Approver").ToList();

            if (signerQuery.Count == 0)
            {
                RadNotification1.Text = "No Email To Send. Please Contact The IT Officer To Resend Your Email.";

                RadNotification1.TitleIcon = string.Empty;

                RadNotification1.ContentIcon = string.Empty;

                RadNotification1.Show();
            }
            else
            {
                foreach (var item in signerQuery)
                {
                    tblEmailLog tblData = item as tblEmailLog;

                    SendEmailToApprover(tblData.SentTo.ToString().Trim(), tblData.JR_Code.ToString().Trim(), tblData.EmailAdd.ToString().Trim());
                }

                RadNotification1.Text = "Request Has Been Sent To Approver";

                RadNotification1.TitleIcon = string.Empty;

                RadNotification1.ContentIcon = string.Empty;

                RadNotification1.Show();
            }
        }
Ejemplo n.º 13
0
    protected void btnIndirimiGeriAl_Click(object sender, EventArgs e)
    {
        //string[] arrVirgulleAyrilmiIstIdler = GridUzerindeSecilmisSatirlarinIdleriniDon().Split(',');
        using (Service1Client proxy = new Service1Client())
        {
            EFDal ed        = new EFDal();
            int   BolgeKodu = ed.kal_BolgeKoduDon(Context.User.Identity.Name);
            //string arrVirgulleAyrilmiIstIdler = proxy.OnaylananFaturaNoIcerigiIstIdleriniDon((short)BolgeKodu, lblFaturaNo.Text);
            //string[] IstIdler = arrVirgulleAyrilmiIstIdler.Split(',');


            string   arrVirgulleAyrilmiIstIdler = proxy.OnaylananFaturaNoIcerigiIstIdleriniDon((short)BolgeKodu, lblFaturaNo.Text);
            string[] IstIdler = arrVirgulleAyrilmiIstIdler.Split(',');
            try
            {
                foreach (string itemIstId in IstIdler)
                {
                    proxy.SeciliIstekIcinIndirimiGeriAl(int.Parse(itemIstId));
                }
                RefreshdenSonraIndirimIsleriniAyarla();
                grdFaturaIcerigiGridiniBagla(lblFaturaNo.Text, lblFirmaAdi.Text);
                RadNotification1.Text = "Uygulanan indirim geri alma işlemi <font color='green'>başarılı!</font>";;
                RadNotification1.Show();
            }
            catch
            {
                RadNotification1.Text = "Uygulanan indirim geri alma işlemi <font color='red'>başarısız!</font>";;
                RadNotification1.Show();
            }
        }
    }
Ejemplo n.º 14
0
 protected void lnkHizliIndirim_Click(object sender, EventArgs e)
 {
     if (tblBuro.Visible)
     {
         tblBuro.Visible = false;
     }
     else
     {
         tblBuro.Visible = true;
     }
     using (Service1Client client = new Service1Client())
     {
         if (FaturaIcindeHaliazirdaUygulanmisIndirimVarmi())
         {
             RadNotification1.Text = "<font color='red'>Bu faturaya hızlı indirim uygulayamazsınız. Fatura kapsamında zaten indirim uygulanmış istekler bulundu!</font>";;
             RadNotification1.Show();
             btnIndirimiGeriAl.Enabled = true;
             btnIndirimiUygula.Enabled = false;
         }
         else
         {
             btnIndirimiUygula.Enabled = true;
             btnIndirimiGeriAl.Enabled = false;
             //if (tblBuro.Visible)
             //{
             //    tblBuro.Visible = false;
             //}
             //else
             //{
             //    tblBuro.Visible = true;
             //}
         }
     }
 }
Ejemplo n.º 15
0
 string caller = "";            // who's calling the grid form
 #endregion
 #region Init, load, unload events
 protected void Page_Init(object sender, EventArgs e)
 {
     // it gets an appropiate context (LainsaSciCTX -> web.config)
     ctx = new LainsaSci("LainsaSciCTX");
     // verify if a Usuario is logged
     Usuario = CntWinWeb.IsSomeoneLogged(this, ctx);
     if (Usuario == null)
     {
         Response.Redirect("Default.aspx");
     }
     else
     {
         Session["UsuarioId"] = Usuario.UsuarioId;
     }
     // si llega aquí está autorizado
     permiso = CntLainsaSci.GetPermiso(Usuario.GrupoUsuario, "TerminalGrid", ctx);
     if (permiso == null)
     {
         RadNotification1.Text = String.Format("<b>{0}</b><br/>{1}",
                                               (string)GetGlobalResourceObject("ResourceLainsaSci", "Warning"),
                                               (string)GetGlobalResourceObject("ResourceLainsaSci", "NoPermissionsAssigned"));
         RadNotification1.Show();
         RadAjaxManager1.ResponseScripts.Add("closeWindow();");
     }
     if (Request.QueryString["Mode"] != null)
     {
         mode = Request.QueryString["Mode"];
     }
     if (Request.QueryString["Caller"] != null)
     {
         caller = Request.QueryString["Caller"];
         if (caller.Equals("TerminalTab"))
         {
             RadTabStrip1.Tabs[1].Visible = false;
             this.Title = String.Format("Accesorio");
         }
     }
     if (Request.QueryString["TerminalId"] != null)
     {
         TerminalId = int.Parse(Request.QueryString["TerminalId"]);
         Terminal terminal = CntLainsaSci.GetTerminal(TerminalId, ctx);
         if (terminal != null)
         {
             Title = String.Format("Terminal: {0}", terminal.Nombre);
         }
     }
     else
     {
         CntWinWeb.OcultarPestanyas(RadTabStrip1);
     }
     if (Request.QueryString["EmpresaId"] != null)
     {
         empresaId = int.Parse(Request.QueryString["EmpresaId"]);
     }
     // control de skin
     if (Session["Skin"] != null)
     {
         RadSkinManager1.Skin = Session["Skin"].ToString();
     }
 }
Ejemplo n.º 16
0
 protected bool DataOk()
 {
     if (txtNombre.Text == "")
     {
         RadNotification1.Text = String.Format("<b>{0}</b><br/>{1}",
                                               (string)GetGlobalResourceObject("ResourceLainsaSci", "Warning"),
                                               (string)GetGlobalResourceObject("ResourceLainsaSci", "NombreNeeded"));
         RadNotification1.Show();
         return(false);
     }
     if (txtLogin.Text == "")
     {
         RadNotification1.Text = String.Format("<b>{0}</b><br/>{1}",
                                               (string)GetGlobalResourceObject("ResourceLainsaSci", "Warning"),
                                               (string)GetGlobalResourceObject("ResourceLainsaSci", "LoginNeeded"));
         RadNotification1.Show();
         return(false);
     }
     if (txtPassword.Text != "" || txtPassword2.Text != "")
     {
         if (txtPassword.Text != txtPassword2.Text)
         {
             RadNotification1.Text = String.Format("<b>{0}</b><br/>{1}",
                                                   (string)GetGlobalResourceObject("ResourceLainsaSci", "Warning"),
                                                   (string)GetGlobalResourceObject("ResourceLainsaSci", "PasswordDoesntMatch"));
             RadNotification1.Show();
             return(false);
         }
     }
     return(true);
 }
Ejemplo n.º 17
0
        protected void btnenter_Click(object sender, EventArgs e)
        {
            if (rd_Building.SelectedValue == "")
            {
                return;
            }

            if (lblprj.Text == "HMIM")
            {
                string _permission = Get_BuildingPermission();
                if (_permission.Substring(Convert.ToInt32(rd_Building.SelectedValue) - 1, 1) != "1")
                {
                    RadNotification1.Show();
                    return;
                }
            }



            Session["building_id"] = rd_Building.SelectedItem.Value;
            Session["building"]    = rd_Building.SelectedItem.Text;

            if (lblid.Text == "0")
            {
                string _prm = "Reports.aspx?id=msc&idx=4&prj=" + lblprj.Text;
                Response.Redirect(_prm);
            }
            else
            {
                summary();
            }
        }
 protected bool DataOk()
 {
     if (txtDescripcion.Text == "")
     {
         RadNotification1.Text = String.Format("<b>{0}</b><br/>{1}",
                                               (string)GetGlobalResourceObject("ResourceLainsaSci", "Warning"),
                                               (string)GetGlobalResourceObject("ResourceLainsaSci", "NombreNeeded"));
         RadNotification1.Show();
         return(false);
     }
     if (rdcTipoDisp.SelectedValue == "")
     {
         RadNotification1.Text = String.Format("<b>{0}</b><br/>{1}",
                                               (string)GetGlobalResourceObject("ResourceLainsaSci", "Warning"),
                                               (string)GetGlobalResourceObject("ResourceLainsaSci", "NecTipoDispositivo"));
         RadNotification1.Show();
         return(false);
     }
     if (chkNoPeriodica.Checked == false)
     {
         if (txtNumeroPeriodos.Value == 0)
         {
             RadNotification1.Text = String.Format("<b>{0}</b><br/>{1}",
                                                   (string)GetGlobalResourceObject("ResourceLainsaSci", "Warning"),
                                                   (string)GetGlobalResourceObject("ResourceLainsaSci", "NumeroPeriodosNoCero"));
             RadNotification1.Show();
             return(false);
         }
     }
     return(true);
 }
Ejemplo n.º 19
0
 protected void btnDelete_Click(object sender, EventArgs e)
 {
     try
     {
         //Bu islem Protokol bastar ve bittar tarihini aynı yapacak protokol gecersiz kalacak
         //Id var güncelleme
         // DateTime.Parse("2011-09-01"), DateTime.Parse("2011-09-01")
         int Id = int.Parse(Request["Id"].ToString());
         using (Service1Client client = new Service1Client())
         {
             DateTime BasTar = DateTime.Parse(ProtokolBasTarTextBox.Text);
             DateTime BitTar = DateTime.Parse(ProtokolBasTarTextBox.Text);
             if (client.YapilanProtokollerTablosunuGuncelle(Id, int.Parse(Session["ProtokolUpdateSeciliFirmaId"].ToString()), BasTar, BitTar, client.UserNamedenUserIdDon(Context.User.Identity.Name), int.Parse(ddlIndirimOranlari.SelectedValue), int.Parse(ddlIndirimAdlari.SelectedValue), txtIndirimAciklama.Text.Trim()))
             {
                 //güncelleme basarili
                 RadNotification1.Text = "Protokol güncelleme işlemi <font color='green'>başarılı. Protokol geçersiz kılındı!</font>";
                 RadNotification1.Show();
             }
             else
             {
                 //güncelleme basarisiz
                 RadNotification1.Text = "Protokol güncelleme işlemi <font color='red'>başarısız!</font>";
                 RadNotification1.Show();
             }
         }
     }
     catch (Exception ex)
     {
         RadNotification1.Text = "Protokol güncelleme işlemi <font color='red'>başarısız!Hata:" + ex.Message + "</font>";
         RadNotification1.Show();
     }
 }
Ejemplo n.º 20
0
    protected void UyariGoster(bool Kirmizimi, string Icerik)
    {
        /*
         * Telerik.Web.UI.RadNotification RadNotification2=new Telerik.Web.UI.RadNotification();
         * RadNotification2.VisibleOnPageLoad = false;
         * RadNotification2.Width = 300;
         * RadNotification2.Height = 100;
         * RadNotification2.Animation = Telerik.Web.UI.NotificationAnimation.Fade;
         * RadNotification2.EnableRoundedCorners = true;
         * RadNotification2.EnableShadow = true;
         * RadNotification2.KeepOnMouseOver = false;
         * RadNotification2.Position = Telerik.Web.UI.NotificationPosition.Center;
         * RadNotification2.Title = "Uyarı";
         */
        if (Kirmizimi)
        {
            RadNotification1.Text = " <font color='red'>" + Icerik + "</font>";
        }
        else
        {
            RadNotification1.Text = " <font color='green'>" + Icerik + "</font>";
        }

        RadNotification1.Show();
    }
Ejemplo n.º 21
0
 protected void Page_Init(object sender, EventArgs e)
 {
     // it gets an appropiate context (LainsaSciCTX -> web.config)
     ctx = new LainsaSci("LainsaSciCTX");
     // verify if a Usuario is logged
     usuario = CntWinWeb.IsSomeoneLogged(this, ctx);
     if (usuario == null)
     {
         Response.Redirect("Default.aspx");
     }
     else
     {
         Session["UsuarioId"] = usuario.UsuarioId;
     }
     // Is it a new record or not?
     if (Request.QueryString["EmailId"] != null)
     {
         email = CntLainsaSci.GetEmail(int.Parse(Request.QueryString["EmailId"].ToString()), ctx);
         LoadData(email);
         empresa     = email.Empresa;
         instalacion = email.Instalacion;
         newRecord   = false;
     }
     else
     {
         if (Request.QueryString["EmpresaId"] != null)
         {
             int empresaId = int.Parse(Request.QueryString["EmpresaId"]);
             empresa             = CntLainsaSci.GetEmpresa(empresaId, ctx);
             lblPropietario.Text = "EMPRESA";
             txtPropietario.Text = empresa.Nombre;
         }
         if (Request.QueryString["RevisionId"] != null)
         {
             int instalacionId = int.Parse(Request.QueryString["RevisionId"]);
             instalacion         = CntLainsaSci.GetInstalacion(instalacionId, ctx);
             lblPropietario.Text = "INSTALACION";
             txtPropietario.Text = instalacion.Nombre;
         }
         if (empresa == null && instalacion == null)
         {
             RadNotification1.Text = String.Format("<b>{0}</b><br/>{1}",
                                                   (string)GetGlobalResourceObject("ResourceLainsaSci", "Warning"),
                                                   (string)GetGlobalResourceObject("ResourceLainsaSci", "EmailWithoutOwner"));
             RadNotification1.Show();
         }
     }
     if (Request.QueryString["Caller"] != null)
     {
         caller = Request.QueryString["Caller"];
     }
     // control de skin
     if (Session["Skin"] != null)
     {
         RadSkinManager1.Skin = Session["Skin"].ToString();
     }
 }
    protected void Page_Init(object sender, EventArgs e)
    {
        // it gets an appropiate context (LainsaSciCTX -> web.config)
        ctx = new LainsaSci("LainsaSciCTX");
        // verify if a Usuario is logged
        usuario = CntWinWeb.IsSomeoneLogged(this, ctx);
        if (usuario == null)
        {
            Response.Redirect("Default.aspx");
        }
        else
        {
            Session["UsuarioId"] = usuario.UsuarioId;
        }
        //
        // si llega aquí está autorizado
        permiso = CntLainsaSci.GetPermiso(usuario.GrupoUsuario, "PlantillaRevisiongrid", ctx);
        if (permiso == null)
        {
            RadNotification1.Text = String.Format("<b>{0}</b><br/>{1}",
                                                  (string)GetGlobalResourceObject("ResourceLainsaSci", "Warning"),
                                                  (string)GetGlobalResourceObject("ResourceLainsaSci", "NoPermissionsAssigned"));
            RadNotification1.Show();
            RadAjaxManager1.ResponseScripts.Add("closeWindow();");
        }
        btnAccept.Visible = permiso.Modificar;

        // Si esto no va antes de PlantillaRevisionID tendrás problemas.
        if (Request.QueryString["Caller"] != null)
        {
            caller = Request.QueryString["Caller"];
            caller = caller.Replace("'", "");
        }
        //
        CargarTiposPeriodo("");
        // Is it a new record or not?
        if (Request.QueryString["PlantillaId"] != null)
        {
            plantillaRevision = CntLainsaSci.GetPlantillaRevision(int.Parse(Request.QueryString["PlantillaId"]), ctx);
            LoadData(plantillaRevision);
            this.Title = String.Format("PlantillaRevision: {0}", plantillaRevision.Descripcion);
            newRecord  = false;
        }
        if (Request.QueryString["TipoId"] != null)
        {
            tipoId = int.Parse(Request.QueryString["TipoId"]);
            tipo   = CntLainsaSci.GetTipoDispositivo(tipoId, ctx);
            if (tipo != null)
            {
                rdcTipoDisp.Items.Clear();
                rdcTipoDisp.Items.Add(new RadComboBoxItem(tipo.Nombre, tipo.TipoId.ToString()));
                rdcTipoDisp.SelectedValue = tipo.TipoId.ToString();
                rdcTipoDisp.Enabled       = false;
                imgbTipo.Enabled          = false;
            }
        }
    }
Ejemplo n.º 23
0
 string caller           = ""; // who's calling the grid form
 #endregion
 #region Init, load, unload events
 protected void Page_Init(object sender, EventArgs e)
 {
     // it gets an appropiate context (LainsaSciCTX -> web.config)
     ctx = new LainsaSci("LainsaSciCTX");
     // verify if a Usuario is logged
     Usuario = CntWinWeb.IsSomeoneLogged(this, ctx);
     if (Usuario == null)
     {
         Response.Redirect("Default.aspx");
     }
     else
     {
         Session["UsuarioId"] = Usuario.UsuarioId;
     }
     // si llega aquí está autorizado
     permiso = CntLainsaSci.GetPermiso(Usuario.GrupoUsuario, "documentogrid", ctx);
     if (permiso == null)
     {
         RadNotification1.Text = String.Format("<b>{0}</b><br/>{1}",
                                               (string)GetGlobalResourceObject("ResourceLainsaSci", "Warning"),
                                               (string)GetGlobalResourceObject("ResourceLainsaSci", "NoPermissionsAssigned"));
         RadNotification1.Show();
         RadAjaxManager1.ResponseScripts.Add("closeWindow();");
     }
     CntWinWeb.TranslateRadGridFilters(RadGrid1);
     if (Request.QueryString["Mode"] != null)
     {
         mode = Request.QueryString["Mode"];
     }
     if (Request.QueryString["Caller"] != null)
     {
         caller = Request.QueryString["Caller"];
     }
     if (Request.QueryString["EmpresaId"] != null)
     {
         empresa = CntLainsaSci.GetEmpresa(int.Parse(Request.QueryString["EmpresaId"]), ctx);
         if (empresa != null)
         {
             RadGrid1.Columns.FindByDataField("Empresa.Nombre").Visible = false;
         }
     }
     if (Request.QueryString["RevisionId"] != null)
     {
         instalacion = CntLainsaSci.GetInstalacion(int.Parse(Request.QueryString["RevisionId"]), ctx);
         if (instalacion != null)
         {
             RadGrid1.Columns.FindByDataField("Empresa.Nombre").Visible     = false;
             RadGrid1.Columns.FindByDataField("Instalacion.Nombre").Visible = false;
         }
     }
     // control de skin
     if (Session["Skin"] != null)
     {
         RadSkinManager1.Skin = Session["Skin"].ToString();
     }
 }
Ejemplo n.º 24
0
 string caller           = "";   // who's calling the grid form
 #endregion
 #region Init, load, unload events
 protected void Page_Init(object sender, EventArgs e)
 {
     // it gets an appropiate context (LainsaSciCTX -> web.config)
     ctx = new LainsaSci("LainsaSciCTX");
     // verify if a Usuario is logged
     Usuario = CntWinWeb.IsSomeoneLogged(this, ctx);
     if (Usuario == null)
     {
         Response.Redirect("Default.aspx");
     }
     else
     {
         Session["UsuarioId"] = Usuario.UsuarioId;
     }
     // -- no hya tratamiento de permisos
     //permiso = CntLainsaSci.GetPermiso(Usuario.GrupoUsuario, "grupousuariogrid", ctx);
     //if (permiso == null)
     //{
     //    RadNotification1.Text = String.Format("<b>{0}</b><br/>{1}",
     //                                          (string)GetGlobalResourceObject("ResourceLainsaSci", "Warning"),
     //                                          (string)GetGlobalResourceObject("ResourceLainsaSci", "NoPermissionsAssigned"));
     //    RadNotification1.Show();
     //    RadAjaxManager1.ResponseScripts.Add("closeWindow();");
     //}
     CntWinWeb.TranslateRadGridFilters(RadGrid1);
     if (Request.QueryString["Mode"] != null)
     {
         mode = Request.QueryString["Mode"];
     }
     if (Request.QueryString["Caller"] != null)
     {
         caller = Request.QueryString["Caller"];
     }
     if (Request.QueryString["EmpresaId"] != null)
     {
         int empresaId = int.Parse(Request.QueryString["EmpresaId"]);
         empresa = CntLainsaSci.GetEmpresa(empresaId, ctx);
     }
     if (Request.QueryString["RevisionId"] != null)
     {
         int instalacionId = int.Parse(Request.QueryString["RevisionId"]);
         instalacion = CntLainsaSci.GetInstalacion(instalacionId, ctx);
     }
     if (empresa == null && instalacion == null)
     {
         RadNotification1.Text = String.Format("<b>{0}</b><br/>{1}",
                                               (string)GetGlobalResourceObject("ResourceLainsaSci", "Warning"),
                                               (string)GetGlobalResourceObject("ResourceLainsaSci", "TelephoneWithoutOwner"));
         RadNotification1.Show();
     }
     // control de skin
     if (Session["Skin"] != null)
     {
         RadSkinManager1.Skin = Session["Skin"].ToString();
     }
 }
Ejemplo n.º 25
0
    protected void Page_Init(object sender, EventArgs e)
    {
        // it gets an appropiate context (LainsaSciCTX -> web.config)
        ctx = new LainsaSci("LainsaSciCTX");
        // verify if a Usuario is logged
        Usuario = CntWinWeb.IsSomeoneLogged(this, ctx);
        if (Usuario == null)
        {
            Response.Redirect("Default.aspx");
        }
        else
        {
            Session["UsuarioId"] = Usuario.UsuarioId;
        }
        //
        // si llega aquí está autorizado
        permiso = CntLainsaSci.GetPermiso(Usuario.GrupoUsuario, "campogrid", ctx);
        if (permiso == null)
        {
            RadNotification1.Text = String.Format("<b>{0}</b><br/>{1}",
                                                  (string)GetGlobalResourceObject("ResourceLainsaSci", "Warning"),
                                                  (string)GetGlobalResourceObject("ResourceLainsaSci", "NoPermissionsAssigned"));
            RadNotification1.Show();
            RadAjaxManager1.ResponseScripts.Add("closeWindow();");
        }
        btnAccept.Visible = permiso.Modificar;

        if (Request.QueryString["Caller"] != null)
        {
            caller = Request.QueryString["Caller"];
            caller = caller.Replace("'", "");
        }

        if (Request.QueryString["PlantillaId"] != null)
        {
            plantilla = CntLainsaSci.GetPlantillaRevision(int.Parse(Request.QueryString["PlantillaId"]), ctx);
            CargaPlantilla(plantilla);
        }
        CargaTipos(new TipoCampo());
        // Is it a new record or not?
        if (Request.QueryString["CampoId"] != null)
        {
            campo = CntLainsaSci.GetCampo(int.Parse(Request.QueryString["CampoId"]), ctx);
            LoadData(campo);
            newRecord = false;
        }
        else
        {
            CargarInformeDe("");
        }
        // control de skin
        if (Session["Skin"] != null)
        {
            RadSkinManager1.Skin = Session["Skin"].ToString();
        }
    }
Ejemplo n.º 26
0
        private void LoadDataInNotification(string notiftext, string title)
        {
            //RadNotification1.ContentIcon = ;
            RadNotification1.Text  = notiftext;
            RadNotification1.Value = "testing";
            RadNotification1.Title = title;

            RadNotification1.Visible = true;
            RadNotification1.Show();
        }
Ejemplo n.º 27
0
 protected void IndirimliTekliflertablosunuGuncelle(int TeklifId, string TeklifNo, decimal YeniBedel, int BolgeKodu)
 {
     using (Service1Client client = new Service1Client())
     {
         decimal IndirimOrani = client.TeklifNodanIndirimOraniniDon(BolgeKodu, TeklifNo);
         if (client.IndirimliTeklifleriGuncelle(TeklifId, YeniBedel, (YeniBedel - (YeniBedel * IndirimOrani / 100))))
         {
             RadNotification1.Text = " <font color='gree'>Indirimli teklifler tablosu da başarı ile güncellendi</font>";;
             RadNotification1.Show();
         }
     }
 }
Ejemplo n.º 28
0
 protected bool DataOk()
 {
     if (rdcTipoCampo.SelectedValue == "")
     {
         RadNotification1.Text = String.Format("<b>{0}</b><br/>{1}",
                                               (string)GetGlobalResourceObject("ResourceLainsaSci", "Warning"),
                                               (string)GetGlobalResourceObject("ResourceLainsaSci", "NecTipoCampo"));
         RadNotification1.Show();
         return(false);
     }
     return(true);
 }
Ejemplo n.º 29
0
 protected bool DataOk()
 {
     if (txtNombre.Text == "")
     {
         RadNotification1.Text = String.Format("<b>{0}</b><br/>{1}",
                                               (string)GetGlobalResourceObject("ResourceLainsaSci", "Warning"),
                                               (string)GetGlobalResourceObject("ResourceLainsaSci", "NombreNeeded"));
         RadNotification1.Show();
         return(false);
     }
     return(true);
 }
 string caller = "";                                 // who's calling the grid form
 #endregion
 #region Init, load, unload events
 protected void Page_Init(object sender, EventArgs e)
 {
     // it gets an appropiate context (LainsaSciCTX -> web.config)
     ctx = new LainsaSci("LainsaSciCTX");
     // verify if a Usuario is logged
     Usuario = CntWinWeb.IsSomeoneLogged(this, ctx);
     if (Usuario == null)
     {
         Response.Redirect("Default.aspx");
     }
     else
     {
         Session["UsuarioId"] = Usuario.UsuarioId;
     }
     // si llega aquí está autorizado
     permiso = CntLainsaSci.GetPermiso(Usuario.GrupoUsuario, "PlantillarevisionGrid", ctx);
     if (permiso == null)
     {
         RadNotification1.Text = String.Format("<b>{0}</b><br/>{1}",
                                               (string)GetGlobalResourceObject("ResourceLainsaSci", "Warning"),
                                               (string)GetGlobalResourceObject("ResourceLainsaSci", "NoPermissionsAssigned"));
         RadNotification1.Show();
         RadAjaxManager1.ResponseScripts.Add("closeWindow();");
     }
     if (Request.QueryString["Mode"] != null)
     {
         mode = Request.QueryString["Mode"];
     }
     if (Request.QueryString["Caller"] != null)
     {
         caller = Request.QueryString["Caller"];
     }
     if (Request.QueryString["PlantillaId"] != null)
     {
         plantillaRevisionId = int.Parse(Request.QueryString["PlantillaId"]);
         this.Title          = String.Format("Plantilla de revisión: {0}", CntLainsaSci.GetPlantillaRevision(plantillaRevisionId, ctx).Descripcion);
     }
     else
     {
         CntWinWeb.OcultarPestanyas(RadTabStrip1);
     }
     if (Request.QueryString["TipoId"] != null)
     {
         tipoId = int.Parse(Request.QueryString["TipoId"]);
         tipo   = CntLainsaSci.GetTipoDispositivo(tipoId, ctx);
     }
     // control de skin
     if (Session["Skin"] != null)
     {
         RadSkinManager1.Skin = Session["Skin"].ToString();
     }
 }