Inheritance: System.EventArgs
コード例 #1
0
ファイル: Colonias.aspx.cs プロジェクト: JYovan/PROJECT_APP
 protected void cmbMunicipio_Select(object sender, DirectEventArgs e)
 {
     //1. Obtener el valor seleccionado y obtener los municipios
     string strMunicipio = e.ExtraParams["valorMunicipio"];
     sColonias.DataSource = ColoniaBusiness.ObtenerColoniasPorMunicipio(strMunicipio);
     sColonias.DataBind();
 }
コード例 #2
0
        protected void btnSave_Click(object sender, Ext.Net.DirectEventArgs e)
        {
            int?projectID = null;

            if (!string.IsNullOrEmpty(cbProject.Value.ToString()))
            {
                projectID = int.Parse(cbProject.Value.ToString());
            }
            string reason = txtReason.Text.Trim();

            XMClaimReason entity = XMClaimReasonService.getSingle(a => a.ProjectID == projectID && a.Reason == reason);

            if (entity != null)
            {
                ExtNet.Msg.Alert("提示", "已有相同的信息存在!").Show();
                return;
            }

            XMClaimReason model = new XMClaimReason();

            model.ProjectID  = projectID;
            model.Reason     = reason;
            model.IsEnable   = false;
            model.CreateID   = HozestERPContext.Current.User.CustomerID;
            model.CreateTime = DateTime.Now;
            model.UpdateID   = HozestERPContext.Current.User.CustomerID;
            model.UpdateTime = DateTime.Now;

            XMClaimReasonService.InsertXMClaimReason(model);
        }
コード例 #3
0
 /// <summary>
 /// 弹窗的添加一条数据
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void btnAdditem_DirectClick(object sender, DirectEventArgs e)
 {
     BG_Policy bg_policy = new BG_Policy();
     try
     {
         bg_policy.POrder = Convert.ToInt32(ADPOrder.Text);
         bg_policy.PTime = Convert.ToDateTime(ADPTime.Text);
         bg_policy.PFrom = ADPFrom.Text;
         bg_policy.PType = ADPcmb.SelectedItem.Value.ToString();
         bg_policy.PTitle = ADPTitle.Text;
         bg_policy.PContent = ADHEdit.Text;
         bg_policy.PStatus = "未发布";
         BG_PolicyManager.AddBG_Policy(bg_policy);
         PolicyDataBind();
         resetform.Reset();
     }
     catch (Exception ex)
     {
         X.Msg.Alert("提示", ex);
     }
     //ADPOrder.Clear();
     //ADPTime.Clear();
     //ADPFrom.Clear();
     //ADPTitle.Clear();
     //ADHEdit.Clear();
     //HEdit.Clear();
 }
コード例 #4
0
        protected void formLoad_Click(object sender, Ext.Net.DirectEventArgs e)
        {
            string data = e.ExtraParams["data"];

            System.Web.Script.Serialization.JavaScriptSerializer    Serializer = new System.Web.Script.Serialization.JavaScriptSerializer();
            List <BusinessLogic.ManageCustomerService.XMWorkerInfo> list       = Serializer.Deserialize <List <BusinessLogic.ManageCustomerService.XMWorkerInfo> >(data);

            if (list.Count <= 0)
            {
                Ext.Net.ExtNet.Msg.Alert("提示", "请选择一条数据").Show();
            }

            Window1.Show();
            fromPanel1.Reset();
            txtID.Text        = list[0].ID.ToString();
            txtName.Text      = list[0].FullName.ToString();
            txtTel.Text       = list[0].Tel.ToString();
            txtLevel.Text     = list[0].LevelType.ToString();
            txtPayMethod.Text = list[0].PayMethod.ToString();
            string[] Provinces = list[0].Province.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
            cbProvince.SetValue(Provinces);
            province_Select(sender, e);
            cbCity.SetValue(list[0].City.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries));
            city_Select(sender, e);
            cbRegion.SetValue(list[0].Regin.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries));
        }
コード例 #5
0
        protected void deleteInfo_Click(object sender, Ext.Net.DirectEventArgs e)
        {
            string data = e.ExtraParams["data"];

            System.Web.Script.Serialization.JavaScriptSerializer    Serializer = new System.Web.Script.Serialization.JavaScriptSerializer();
            List <BusinessLogic.ManageCustomerService.XMWorkerInfo> list       = Serializer.Deserialize <List <BusinessLogic.ManageCustomerService.XMWorkerInfo> >(data);

            if (list.Count <= 0)
            {
                Ext.Net.ExtNet.Msg.Alert("提示", "请选择一条数据").Show();
            }

            int ID = list[0].ID;

            BusinessLogic.ManageCustomerService.XMWorkerInfo entity = XMWorkerInfoService.getSingle(a => a.ID == ID);
            if (entity == null)
            {
                ExtNet.Msg.Alert("提示", "记录不存在!").Show();
                return;
            }

            entity.IsEnable = true;

            XMWorkerInfoService.UpdateXMWorkerInfo(entity);
        }
コード例 #6
0
    protected void cmdCommand(object sender, Ext.Net.DirectEventArgs e)
    {
        string plate       = Convert.ToString(e.ExtraParams["plate"]);
        int    busId       = Convert.ToInt32(e.ExtraParams["busId"]);
        String CommandName = e.ExtraParams["command"];

        // Bus bus = new Bus();

        if (plate == "")
        {
            return;
        }
        switch (CommandName)
        {
        case "cmdUpdate":
            hdnBusType.SetValue(busId);
            TextbusId.Text = busId.ToString();
            txtPlate.Text  = plate;
            Window1.Show();
            break;

        case "cmdDel":
            hdnBusDelete.SetValue(plate);
            wndDeleteConfirm.Show();
            break;
        }
    }
コード例 #7
0
        protected void btnSaveSystemOperation_Click(object sender, DirectEventArgs e)
        {
            try
            {
                SystemOperationWrapper obj = SystemOperationWrapper.FindById(int.Parse(hidOperationID.Text.Trim()));
                obj.OperationNameCn = this.txtOperationNameCn.Text.Trim();
                obj.OperationNameEn = this.txtOperationNameEn.Text.Trim();
                obj.OperationDescription = this.txtOperationDescription.Text.Trim();
                obj.IsSystemOperation = this.chkIsSystemOperation.Checked;
                obj.IsCanSingleOperation = this.chkIsCanSingleOperation.Checked;
                obj.IsCanMutilOperation = this.chkIsCanMutilOperation.Checked;
                obj.IsEnable = this.chkIsEnable.Checked;
                obj.IsInListPage = this.chkIsInListPage.Checked;
                obj.IsInSinglePage = this.chkIsInSinglePage.Checked;
                obj.OperationOrder = Convert.ToInt32(this.txtOperationOrder.Text.Trim());
                obj.IsCommonOperation = this.chkIsCommonOperation.Checked;

                SystemOperationWrapper.Update(obj);

                winSystemOperationEdit.Hide();
                ResourceManager.AjaxSuccess = true;
            }
            catch (Exception ex)
            {
                ResourceManager.AjaxSuccess = false;
                ResourceManager.AjaxErrorMessage = "Error Message : " + ex.Message;
                return;
            }
        }
コード例 #8
0
ファイル: Colonias.aspx.cs プロジェクト: JYovan/PROJECT_APP
 /// <summary>
 /// Evento que se lanza al escoger un elemento de Estados
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void cmbEstado_Change(object sender, DirectEventArgs e)
 {
     //1. Obtener el estado seleccionado y obtener los Municipios
     string strEstado = e.ExtraParams["valor"];
     sMunicipios.DataSource = MunicipioBusiness.ObtenerMunicipiosPorEstado(strEstado);
     sMunicipios.DataBind();
 }
コード例 #9
0
        //新增資料
        protected void btnNew_DirectClick(object sender, Ext.Net.DirectEventArgs e)
        {
            string userID = HttpContext.Current.Session["checklogin"].ToString();
            int    ID;
            string Customer_ID       = New_Customer_ID.Text;
            string Category          = New_Category.Text;
            string Part              = New_Part.Text;
            string Part_Id           = New_Part_Id.Text;
            string Yield_Impact_Item = New_Yield_Impact_Item.Text;
            string Key_Module        = New_Key_Module.Text;
            string Data_Source       = New_Data_Source.Text;
            string Critical_Item     = New_Critical_Item.Text;
            string EDA_Item          = New_EDA_Item.Text;
            string MAIN_ID           = New_MAIN_ID.Text;

            _msg = "";

            maxid = DBProcess_sign.maxID();
            ID    = int.Parse(maxid.Rows[0][0].ToString()) + 1;



            DBProcess_sign.Insert_Data(ID, Customer_ID, Category, Part, Part_Id, Yield_Impact_Item, Key_Module, Data_Source, Critical_Item, EDA_Item, MAIN_ID, userID, ref _msg);
            ReFlash();

            String counts = DBProcess_sign.Signcount(Category, Part_Id, EDA_Item, ref _msg);

            X.MessageBox.Alert("提示", " After search , all have   " + counts + " counts ").Show();
        }
コード例 #10
0
        protected void cboProduto_TriggerClick(object e, Ext.Net.DirectEventArgs sender)
        {
            if (!string.IsNullOrEmpty(cboProduto.SelectedItem.Value))
            {
                int addproduto = int.Parse(cboProduto.SelectedItem.Value);


                CRJProdutoNegocio ProdutoBO      = new CRJProdutoNegocio();
                CRJProduto        ProdutoColecao = new CRJProduto();

                ProdutoColecao = ProdutoBO.ObterCRJProdutoPorId(addproduto);

                CRJProdutoVendido produtovenda = new CRJProdutoVendido();

                produtovenda.Produto   = ProdutoColecao;
                produtovenda.Nome      = ProdutoColecao.Nome;
                produtovenda.Preco     = ProdutoColecao.Preco;
                produtovenda.IdProduto = ProdutoColecao.IdProduto;

                GridCRJProdutoVendido.AddRecord(produtovenda, true);
                GridCRJProdutoVendido.GetView().Refresh();

                //StoreCRJProdutoVendido.AddRecord(produtovenda, true);

                cboProduto.Clear();
            }
        }
コード例 #11
0
    protected void btnGuardarNuevoMantenimiento(object sender, DirectEventArgs e)
    {
        try
        {
            int ar_marca = int.Parse(this.sltMarca.SelectedItem.Value);
            int ar_id = int.Parse(this.cmbSerie.SelectedItem.Value);
            DateTime fecha = this.dteFecha.SelectedDate;
            int tipoMantenimiento = int.Parse(this.sltTipoMantenimiento.SelectedItem.Value);
            int responsable = int.Parse(this.sltResponsable.SelectedItem.Value);
            string falla = this.txtFalla.Text;
            string accion = this.txtAccion.Text;
            string repuestos = this.txtRepuestos.Text;
            mantenimientos.Insert_Mantenimiento(ar_id, ar_marca, fecha, responsable, falla, accion, repuestos, tipoMantenimiento);

            this.GridStore.Reload();
            this.VentanaMantenimientoNuevo.Hide();
        }
        catch(Exception)
        {
            Ext.Net.Notification.Show(new NotificationConfig
            {
                Title = "Error Al guardar",
                Icon = Icon.Error,
                Width = 400,
                Height = 100,
                Html = "Ingreso de datos incorretos",
                Shadow = true,

            });
        }
    }
コード例 #12
0
        protected void btnGenerate_Click(object sender, DirectEventArgs e)
        {
            using (var unitOfWork = new UnitOfWorkScope(true))
            {
                BusinessLogic.GenerateBillFacade.GenerateReceivable(dtGenerationDate.SelectedDate);
            }
            using (var unitOfWork = new UnitOfWorkScope(true))
            {

                LoanAccount.UpdateLoanAccountStatus(dtGenerationDate.SelectedDate);
            }
            using (var unitOfWork = new UnitOfWorkScope(true))
            {
                DemandLetter.UpdateDemandLetterStatus(dtGenerationDate.SelectedDate);
            }
            using (var unitOfWork = new UnitOfWorkScope(true))
            {
                Customer.UpdateCustomerStatus(dtGenerationDate.SelectedDate);
            }
            using (var unitOfWork = new UnitOfWorkScope(true))
            {

                FinancialProduct.UpdateStatus();

            }
        }
コード例 #13
0
 /// <summary>
 /// Permite seleccionar una celda de la tabla y recuperar el ID de la cotización
 /// </summary>
 /// <param name="sender">object sender</param>
 /// <param name="e">DirectEventArgs e</param>
 protected void Cell_Click(object sender, DirectEventArgs e)
 {
     CellSelectionModel sm = this.GridPanel1.SelectionModel.Primary as CellSelectionModel;
     idCot = Convert.ToString(sm.SelectedCell.RecordID);
     lbl_Cot.Text = "";
     lbl_Cot.Text = "       " + idCot;
 }
コード例 #14
0
ファイル: StylePicture.aspx.cs プロジェクト: huaminglee/Code
    protected void BtnSave_Click(object sender, DirectEventArgs e)
    {
        try
        {
            Y_StylePicture _Y_StylePicture = new Y_StylePicture();
            string filename = UpFile.PostedFile.FileName;
            if (string.IsNullOrEmpty(filename))
            {
                X.Msg.Alert("失败", "请先选择要上传的图片!").Show();
                return;
            }
            if (Hid.Text.Length > 0)
            {

                string ext = Path.GetExtension(filename).ToLower();
                if (ext != ".png" && ext != ".jpg")
                {
                    X.Msg.Notify("失败", "<font color='red'>文件格式不正确,仅支持png,jpg格式文件!</font>").Show();
                    return;
                }
                filename = DateTime.Now.ToString("yyyyMMddHHmmss") + ext;
                UpFile.PostedFile.SaveAs(Server.MapPath("StylePicture/" + filename));
                IList<Y_StylePicture> list = WMSFactory.Y_StylePicture.FindByCondition("StyleId+ColorId='" + Hid.Text.Trim() + "'");
                bool isok = false;
                if (list != null && list.Count == 1)
                {
                    _Y_StylePicture = list[0];
                    if (File.Exists(Server.MapPath("StylePicture/" + _Y_StylePicture.Picture)))
                        File.Delete(Server.MapPath("StylePicture/" + _Y_StylePicture.Picture));
                    _Y_StylePicture.Picture = filename; //图标地址
                    isok = WMSFactory.Y_StylePicture.Update(_Y_StylePicture);
                }
                else
                {
                    _Y_StylePicture.StyleId = Hid.Text.Trim().Substring(0, Hid.Text.Trim().Length - 1);
                    _Y_StylePicture.ColorId = Hid.Text.Trim().Replace(_Y_StylePicture.StyleId, "");
                    _Y_StylePicture.Picture = filename;
                    isok = WMSFactory.Y_StylePicture.Add(_Y_StylePicture);
                }
                if (isok)
                {
                    CL_WinEdit.Hide();
                    Y_Grid.Reload();
                    MsgBox.NotifiShow("恭喜您,操作成功!", "OK");
                }
                else
                    MsgBox.MessageShow("操作失败,请您重试!", "ERROR");
            }
            else
            {
                X.Msg.Alert("失败", "请重新选择要修改的行!").Show();
                return;
            }
        }
        catch (Exception error)
        {
            X.Msg.Alert("失败", "异常:" + error.Message).Show();
            return;
        }
    }
コード例 #15
0
 protected void btnEditar_Click(object sender, DirectEventArgs e)
 {
     base.AcaoTela = Common.AcaoTela.Edicao;
     PreencherCampos(e);
     winMensagem.Title = "Alterando Mensagem";
     winMensagem.Show((Control)sender);
 }
コード例 #16
0
 protected void Checkbox_Check(object sender, DirectEventArgs e)
 {
     /*if (!CheckboxMesActual.Checked)
         //ComboBox1.Show();
     else
         //ComboBox1.Hide();*/
 }
コード例 #17
0
 protected void Checkbox_Check(object sender, DirectEventArgs e)
 {
     if (!CheckboxTodos.Checked)
         ComboBox1.Show();
     else
         ComboBox1.Hide();
 }
コード例 #18
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void lkbCancelar_Click(object sender, Ext.Net.DirectEventArgs e)
        {
            if (Request.QueryString.Get("qTela") != "Incluir")
            {
                bool Hidden = true;

                txtSenha.Clear();
                txtConfrimSenha.Clear();

                txtSenha.Hidden        = Hidden;
                txtConfrimSenha.Hidden = Hidden;

                txtSenha.AllowBlank        = Hidden;
                txtConfrimSenha.AllowBlank = Hidden;

                lkbAlterarSenha.Hidden = false;
                lkbCancelar.Hidden     = true;
            }
            else
            {
                txtSenha.Hidden            = false;
                txtConfrimSenha.Hidden     = false;
                txtConfrimSenha.AllowBlank = false;
                txtSenha.AllowBlank        = false;

                lkbAlterarSenha.Hidden = true;
            }
        }
コード例 #19
0
        protected void btnSaveSystemResources_Click(object sender, DirectEventArgs e)
        {
            try
            {
                SystemResourcesWrapper obj = new SystemResourcesWrapper();

                int pid = Convert.ToInt32(this.hidParentResourcesID.Value);

                if (pid > 0)
                {
                    obj.ParentResourcesID = SystemResourcesWrapper.FindById(pid);
                }
                else
                {
                    obj.ParentResourcesID = null;
                }

                obj.ResourcesNameCn = this.txtResourcesNameCn.Text.Trim();
                obj.ResourcesNameEn = this.txtResourcesNameEn.Text.Trim();
                obj.ResourcesDescription = this.txtResourcesDescription.Text.Trim();

                obj.ResourcesIsRelateUser = this.chkResourcesIsRelateUser.Checked;

                SystemResourcesWrapper.Save(obj);

                winSystemResourcesAdd.Hide();

            }
            catch (Exception ex)
            {
                ResourceManager.AjaxSuccess = false;
                ResourceManager.AjaxErrorMessage = "Error Message:" + ex.Message;
            }
        }
コード例 #20
0
ファイル: Search.aspx.cs プロジェクト: huaminglee/Code
 //登帐反登帐
 protected void BtnDZ_Click(object sender, DirectEventArgs e)
 {
     string username = WMSFactory.d_Move.GetCurUser(Request["userid"]);
     int Success = 0, Failed = 0;
     RowSelectionModel sm = d_Move_Grid.SelectionModel.Primary as RowSelectionModel;
     foreach (SelectedRow row in sm.SelectedRows)
     {
         d_Move _d_Move = new d_Move();
         _d_Move.moveid = (row.RecordID);
         if (e.ExtraParams["Flag"].ToString() == "1")
         {
             if (WMSFactory.d_Move.UpdateByConditions("set_sure=1,setsure_date=getdate(),setsure_name='" + username + "'", "moveid='" + row.RecordID + "'"))
                 Success++;
             else 
                 Failed++;
         }
         else
         {
             if (WMSFactory.d_Move.UpdateByConditions("set_sure=0", "moveid='" + row.RecordID + "'"))
             {
                 WMSFactory.d_Move.UpdateByConditions("setsure_date=getdate(),setsure_name='" + username + "'", "moveid='" + row.RecordID + "'");
                 Success++;
             }
             else Failed++;
         }
     }
     d_Move_Grid.Reload();
     if (Failed > 0)
         MsgBox.MessageShow("操作完成,成功" + Success.ToString() + "条,失败" + Failed.ToString() + "条!", "OK");
     else
         MsgBox.NotifiShow("操作完成,成功" + Success.ToString() + "条,失败" + Failed.ToString() + "条!", "OK");
 }
コード例 #21
0
        protected void btnEdit_Click(object sender, Ext.Net.DirectEventArgs e)
        {
            int ID        = int.Parse(txtID.Text);
            int?projectID = null;

            if (!string.IsNullOrEmpty(cbProject.Value.ToString()))
            {
                projectID = int.Parse(cbProject.Value.ToString());
            }
            string reason = txtReason.Text.Trim();

            XMClaimReason entity = XMClaimReasonService.getSingle(a => a.ID == ID);

            if (entity == null)
            {
                ExtNet.Msg.Alert("提示", "记录不存在!").Show();
                return;
            }

            entity.ProjectID  = projectID;
            entity.Reason     = reason;
            entity.CreateID   = HozestERPContext.Current.User.CustomerID;
            entity.CreateTime = DateTime.Now;
            entity.UpdateID   = HozestERPContext.Current.User.CustomerID;
            entity.UpdateTime = DateTime.Now;

            XMClaimReasonService.UpdateXMClaimReason(entity);
        }
コード例 #22
0
ファイル: Default.aspx.cs プロジェクト: falkenbach/tinnguyen
        protected void viewTuongItem_Click(object sender, Ex.DirectEventArgs e)
        {
            if (sender is Ex.DataView)
            {
                string           selectedID = (sender as Ex.DataView).SelectedRecordID;
                DB.DBDataContext db         = new DB.DBDataContext();
                var off = (from t
                           in db.M_Tuongs
                           where t.Pid.ToString() == selectedID
                           select t).FirstOrDefault();

                Ex.Window win = new Ex.Window
                {
                    ID     = "wShowDetail" + off.MaTuong,
                    Title  = off.TenTuong,
                    Height = 353,
                    Width  = 493,
                    //BodyPadding = 5,
                    Resizable   = false,
                    Modal       = false,
                    CloseAction = Ex.CloseAction.Destroy,
                    Html        = "<img src='?big=true&tuong=" + off.MaTuong + "'>"
                };

                win.Render(this.Form);
            }
        }
コード例 #23
0
    protected void btnSearch_DirectClick(object sender, Ext.Net.DirectEventArgs e)
    {
        string yearStr = cboStartYear.RawValue.ToString();

        Response.Redirect("AssignDataQuery.aspx?year=" + yearStr + "&hid1=" + hid1.Value + "&hid2=" + hid2.Value + "&hid3=" + hid3.Value, true);

        //cboStartYear.SelectedItem.Value = yearStr;
        //btnExpand.Show();
        //FieldSet1.Hide();
        //ShowDtBind(yearStr);
        //ShowFiledCoum();

        //GridPanel1.ColumnModel.Columns[2].Visible = false;

        ////支出经济科目选择项大于0【有选择项】收入经济科目选择项小于0【无选择项】
        //if (EICodingList.Count <= 0 && PICodingList.Count > 0)
        //{

        //}
        ////收入经济科目选择项大于0【有选择项】支出经济科目选择项小于0【无选择项】
        //if (PICodingList.Count <= 0 && EICodingList.Count > 0)
        //{

        //}
        ////收入经济科目选择项大于0【有选择项】支出经济科目选择项大于0【有选择项】
        //if (PICodingList.Count > 0 && EICodingList.Count > 0)
        //{

        //}
        ////收入经济科目选择项小于0【无选择项】支出经济科目选择项小于0【无选择项】
        //if (PICodingList.Count <= 0 && EICodingList.Count <= 0)
        //{

        //}
    }
コード例 #24
0
        protected void btnOgrenciKaydet_DirectClick(object sender, Ext.Net.DirectEventArgs e)
        {
            Ogrenciler ogrenci = new Ogrenciler();

            try
            {
                ogrenci.ogrenciNo     = txtOgrenciNo.Text;
                ogrenci.ogrenciAd     = txtOgrenciAd.Text;
                ogrenci.ogrenciSoyad  = txtOgrenciSoyad.Text;
                ogrenci.bolumID       = Convert.ToInt32(cmbBolum.SelectedItem.Value);
                ogrenci.adres         = txtAdres.Text;
                ogrenci.memleketAdres = txtMemleketAdres.Text;
                ogrenci.kayitTarih    = dpicKayitTarih.SelectedDate;
                ogrenci.cepTelefon    = txtCepTelefon.Text;

                OgrenciFacade ogrencilerDB = new OgrenciFacade();


                ogrencilerDB.Ekle(ogrenci);

                basariliKayitMesajiVer();
            }

            catch (Exception ex)
            {
                System.Windows.Forms.MessageBox.Show(ex.Message);
                X.Msg.Notify(new NotificationConfig
                {
                    Icon  = Icon.UserAlert,
                    Title = "Kayıt Yapılamadı !"
                }).Show();
            }
        }
コード例 #25
0
        protected void Button1_Click(object sender, DirectEventArgs e)
        {
            Investidor usu = new Investidor();
            string strLoginApelido;
            string strPassword;

            strLoginApelido = this.txtUsuario.Text;
            strPassword = this.txtPassword.Text;
            Core.App.InvestidorAPL.asdasdasd();

            try
            {
                usu.StrLogin = txtUsuario.Text;
                usu.StrKeyPass = strPassword;

                if (logarUsuario(ref usu))
                {
                    Session.Add("usuario", usu);
                    Page.Response.Redirect("Desktop.aspx");
                }
                else
                    throw new Exception("Verifique o Login e Senha");
            }
            catch (Exception ex)
            {
                X.Msg.Alert("Erro", ex.Message).Show();
                return;
            }
        }
コード例 #26
0
        public void LinhaGrid_DirectClick(object sender, Ext.Net.DirectEventArgs e)
        {
            string idProfXMateriaXClasse = e.ExtraParams["idProfXMateriaXClasse"];
            string TitulodaPagina        = e.ExtraParams["Titulo"];
            string IdClasse = e.ExtraParams["IdClasse"];

            if (e.ExtraParams["IDObjeto"] == "btnConsultarAtividade")
            {
                string URL = "PesquisaAtividade.aspx?IdProf=" + idProfXMateriaXClasse;
                URL += "&TitulodaPagina=" + TitulodaPagina;
                URL += "&IdClasse=" + e.ExtraParams["IdClasse"];;

                ExibirModalCadastro("Atividades", URL, 500, 790, true, true, Icon.FolderPage);
            }


            if (e.ExtraParams["IDObjeto"] == "btnFrquencia")
            {
                string URL = "LancamentoFrequencia.aspx?IdProf=" + idProfXMateriaXClasse;
                URL += "&TitulodaPagina=" + TitulodaPagina;
                URL += "&IdClasse=" + e.ExtraParams["IdClasse"];

                ExibirModalCadastro("Frequência - " + TitulodaPagina, URL, 560, 790, true, true, Icon.TableEdit);
            }

            if (e.ExtraParams["IDObjeto"] == "btnNotas")
            {
                string URL = "LancamentoNota.aspx?IdProf=" + idProfXMateriaXClasse;
                URL += "&TitulodaPagina=" + TitulodaPagina;
                URL += "&IdClasse=" + e.ExtraParams["IdClasse"];

                ExibirModalCadastro("Notas - " + TitulodaPagina, URL, 560, 790, true, true, Icon.Sum);
            }
        }
コード例 #27
0
    public void click_btn_guardar(object sender, DirectEventArgs e)
    {
      try
      {

        string Tmensaje = ErrorText.REGISTRO_INGRESADO;

        //

        co_re_subcategorias obj = new co_re_subcategorias();
        if (hid_id.Text != "0")
        {
          obj = new bf_re_subcategorias().GetData(Convert.ToInt32(hid_id.Text));
          Tmensaje = ErrorText.REGISTRO_MODIFICADO;
        }
        obj.subca_subcategoria = txt_subca_subcategoria.Text;
        obj.subca_orden = Convert.ToInt32(num_subca_orden.Text);
        obj.id_categoria.id = Convert.ToInt32(hid_id_categoria.Text);

        if (hid_id.Text == "0")
        {
          panelCenter.Reset();
        }

        new bf_re_subcategorias().Save(obj);

        //

        Mensajes.Show("Mensaje", Tmensaje, MessageBox.Icon.INFO);
      }
      catch (Exception ex)
      {
        Mensajes.Error(ex.Message);
      }
    }
コード例 #28
0
        protected void btnDoneAddressDetail_DirectClick(object sender, DirectEventArgs e)
        {
            hiddenStreet.Text = txtStreetAddress.Text;
            hiddenBarangay.Text = txtBarangay.Text;
            if (radioCity.Checked == true)
            {
                hiddenMunicipality.Text = "";
                hiddenCity.Text = txtCityOrMunicipality.Text;
            }
            else
            {
                hiddenCity.Text = "";
                hiddenMunicipality.Text = txtCityOrMunicipality.Text;
            }

            hiddenProvince.Text = txtProvince.Text;
            hiddenCountry.Text = cmbCountry.SelectedItem.Text;
            hiddenPostalCode.Text = txtPostalCode.Text;
            txtBusinessAddress.Text = StringConcatUtility.Build(", ", hiddenStreet.Text,
                hiddenBarangay.Text, hiddenMunicipality.Text, hiddenCity.Text, hiddenProvince.Text,
                hiddenCountry.Text, hiddenPostalCode.Text);
            winAddressDetail.Hidden = true;

            txtName.Text = txtName.Text;

            using (var context = new FinancialEntities())
            {
                int countryId = int.Parse(cmbCountry.SelectedItem.Value.ToString());
                var country = context.Countries.SingleOrDefault(entity => entity.Id == countryId);
                txtFaxCode.Text = country.CountryTelephoneCode;
                txtTelephoneCode.Text = country.CountryTelephoneCode;
            }
        }
コード例 #29
0
ファイル: RoleUser.aspx.cs プロジェクト: MasterKongKong/eReim
 protected void btnLogin_Click(object sender, DirectEventArgs e)
 {
     DataSet ds = new DataSet();
     bool user = DIMERCO.SDK.Utilities.ReSM.CheckUserInfo(tfUserID.Text.Trim(), tfPW.Text.Trim(), ref ds);
     if (ds.Tables[0].Rows.Count == 1)
     {
         DataTable dtuser = ds.Tables[0];
         Session["UserID"] = dtuser.Rows[0]["UserID"].ToString();
         DataSet ds1 = DIMERCO.SDK.Utilities.LSDK.getUserProfilebyUserList(dtuser.Rows[0]["UserID"].ToString());
         if (ds1.Tables[0].Rows.Count == 1)
         {
             DataTable dt1 = ds1.Tables[0];
             Session["UserName"] = dt1.Rows[0]["fullName"].ToString();
             Session["Station"] = dt1.Rows[0]["stationCode"].ToString();
             Session["Department"] = dt1.Rows[0]["DepartmentName"].ToString();
             Session["CostCenter"] = dt1.Rows[0]["CostCenter"].ToString();
             X.AddScript("window.location.reload();");
         }
         else
         {
             X.Msg.Alert("Message", "Data Error.").Show();
             return;
         }
     }
     else
     {
         X.Msg.Alert("Message", "Please confirm your UserID and Password.").Show();
         return;
     }
     if (ds != null)
     {
         ds.Dispose();
     }
 }
コード例 #30
0
ファイル: Socios.aspx.cs プロジェクト: xapiz/COCASJOL
        protected void UploadClick(object sender, DirectEventArgs e)
        {
            try
            {
                if (this.FileUploadField1.HasFile)
                {
                    string loggedUsr = Session["username"] as string;

                    COCASJOL.LOGIC.Utiles.ImportarExcelLogic excelImport = new LOGIC.Utiles.ImportarExcelLogic();

                    string extension = Path.GetExtension(this.FileUploadField1.FileName);

                    string uploadSavePath = System.Configuration.ConfigurationManager.AppSettings.Get("uploadSavePath");
                    string uploadNameSocios = System.Configuration.ConfigurationManager.AppSettings.Get("uploadNameSocios");

                    string savePath = Server.MapPath(uploadSavePath) + uploadNameSocios + extension;

                    string msg = "";

                    lock (lockObj)
                    {
                        this.FileUploadField1.PostedFile.SaveAs(savePath);
                         msg = excelImport.SociosCargarDatos(savePath, loggedUsr);
                    }
                    this.BasicForm.Reset();
                    X.Msg.Alert("Importar Socios", msg).Show();
                    this.SociosSt_Reload(null, null);
                }
            }
            catch (Exception ex)
            {
                log.Fatal("Error fatal al guardar archivo subido.", ex);
                throw;
            }
        }
コード例 #31
0
        protected void cboPessoa_Select(object e, Ext.Net.DirectEventArgs sender)
        {
            CRJPessoaNegocio PessoaBO      = new CRJPessoaNegocio();
            List <CRJPessoa> PessoaColecao = new List <CRJPessoa>();

            nomepessoa.Text = PessoaBO.ObterCRJPessoaPorId(int.Parse(cboPessoa.Value.ToString())).Nome;
        }
コード例 #32
0
        protected void btnSave_OnDirectEvent(object sender, DirectEventArgs e)
        {
            int loanId = int.Parse(hdnLoanId.Text);
            var LoanStatus = ObjectContext.LoanAccountStatus.SingleOrDefault(entity => entity.LoanAccount.FinancialAccountId == loanId && entity.IsActive == true);
            var loanAccountStatusTypeAssoc = ObjectContext.LoanAccountStatusTypeAssocs.Where(entity => entity.EndDate == null
                                                && entity.FromStatusTypeId == LoanStatus.LoanAccountStatusType.Id
                                                && entity.ToStatusTypeId == LoanAccountStatusType.UnderLitigationType.Id);

            if (loanAccountStatusTypeAssoc == null)
            {
                X.Msg.Alert("Error!", "Cannot change status to Under Litigation.").Show();
                return;
            }
            LoanStatus.IsActive = false;

            LoanAccountStatu newLoanAccountStatus = new LoanAccountStatu();
            newLoanAccountStatus.FinancialAccountId = loanId;
            newLoanAccountStatus.LoanAccountStatusType = LoanAccountStatusType.UnderLitigationType;
            newLoanAccountStatus.Remarks = txtComment.Text;
            newLoanAccountStatus.TransitionDateTime = DateTime.Now;
            newLoanAccountStatus.IsActive = true;
            ObjectContext.LoanAccountStatus.AddObject(newLoanAccountStatus);

            ChangeCustomerStatusToUnderLitigation(loanId);

            ObjectContext.SaveChanges();
        }
コード例 #33
0
        protected void imgbtnAceptar_Click(object sender, DirectEventArgs e)
        {
            //1. Obtener datos de la Forma y saber si es edición o nuevo

            string strDescripcion = e.ExtraParams["DescripcionCorta"].Trim().Equals("") || e.ExtraParams["DescripcionCorta"] ==null?"":e.ExtraParams["DescripcionCorta"];
            string strGeneradorD = e.ExtraParams["GeneradorD"];
            string strPlano = e.ExtraParams["vPlano"];
            int iID = Convert.ToInt32(Cookies.GetCookie("cookieEditarOrdenEstimacion").Value);
            string strConcepto = Cookies.GetCookie("cookieConceptoOrdenEstimacion").Value;

            //2. Serializar el detalle

            List<GeneradorOrdenEstimacionD> lGeneradorD = JSON.Deserialize<List<GeneradorOrdenEstimacionD>>(strGeneradorD);

            //3. Guardar o Actuaizar el Movimiento

            //4. Lo que sucede cuando no es nuevo y ya se habia guardado

            //Se revisa que no este en la bd si devuelve falso se inserta pro primera vez
            if (GeneradorOrdenEstimacionDBusiness.ObtenerGeneradorOrdenEstimacionVaciosPorMovimientoConcepto(strConcepto, iID))
            {

                //1. Borrar todo el detalle e insertarlo de nuevo
                GeneradorOrdenEstimacionDBusiness.BorrarGeneradorOrdenEstimacionDPorConcepto(iID, strConcepto);

                //2. Insertar los datos del detalle
                foreach (GeneradorOrdenEstimacionD sd in lGeneradorD)
                {
                    //2. Validar que el objeto no venga en blanco
                    if (sd.Area.Equals(string.Empty) || sd.Total == 0)
                        continue;
                    else
                    {
                        sd.ConceptoID = strConcepto;
                        sd.MovID = iID;
                        sd.Descripcion = strDescripcion;
                        sd.Plano = strPlano;
                        GeneradorOrdenEstimacionDBusiness.Insertar(sd);
                    }
                }
            }
            else
            {
                //1. Insertar los datos del detalle y regresar valor
                foreach (GeneradorOrdenEstimacionD sd in lGeneradorD)
                {
                    //2. Validar que el objeto no venga en blanco
                    if (sd.Area.Equals(string.Empty) || sd.Total == 0)
                        continue;
                    else
                    {
                        sd.ConceptoID = strConcepto;
                        sd.MovID = iID;
                        sd.Descripcion = strDescripcion;
                        sd.Plano = strPlano;
                        GeneradorOrdenEstimacionDBusiness.Insertar(sd);
                    }
                }
            }
        }
コード例 #34
0
 internal virtual void OnEvent(DirectEventArgs e)
 {
     if (this.Handler != null)
     {
         this.Handler(this.Owner, e);
     }
 }
コード例 #35
0
        protected void btnSaveSystemDictionary_Click(object sender, DirectEventArgs e)
        {
            try
            {
                SystemDictionaryWrapper obj = new SystemDictionaryWrapper();
                obj.SystemDictionaryGroupID = DictionaryGroup;
                obj.SystemDictionaryKey = this.txtSystemDictionaryKey.Text.Trim();
                obj.SystemDictionaryCode = this.txtSystemDictionaryCode.Text.Trim();
                obj.SystemDictionaryValue = this.txtSystemDictionaryValue.Text.Trim();
                obj.SystemDictionaryDesciption = this.txtSystemDictionaryDesciption.Text.Trim();
                obj.SystemDictionaryOrder = Convert.ToInt32(this.txtSystemDictionaryOrder.Text.Trim());
                obj.SystemDictionaryIsEnable = this.chkSystemDictionaryIsEnable.Checked;
                obj.SystemDictionaryIsSystem = this.chkSystemDictionaryIsSystem.Checked;

                SystemDictionaryWrapper.Save(obj);

                SysDictionaryWrapper.RefreshCache();

                winSystemDictionaryAdd.Hide();

            }
            catch (Exception ex)
            {
                ResourceManager.AjaxSuccess = false;
                ResourceManager.AjaxErrorMessage = "ErrorMessage:" + ex.Message;
            }
        }
コード例 #36
0
    protected void cmdCommand(object sender, Ext.Net.DirectEventArgs e)
    {
        string tc          = Convert.ToString(e.ExtraParams["tc"]);
        int    driverId    = Convert.ToInt32(e.ExtraParams["driverId"]);
        String CommandName = e.ExtraParams["command"];

        // Bus bus = new Bus();

        if (tc == "")
        {
            return;
        }
        switch (CommandName)
        {
        case "cmdUpdate":
            hdnDriverType.SetValue(driverId);
            txtdriverId.Text = driverId.ToString();
            txttc.Text       = tc;
            WindowDriver.Show();
            break;

        case "cmdDel":
            hdnDriverDelete.SetValue(tc);
            wndDeleteConfirm.Show();
            break;
        }
    }
コード例 #37
0
        //  =======================   FUNCIONES OPERACIONES CUENTAS EJECUTIVO   ===========================
        
        /// <summary>
        /// Muestra el detalle de los datos del usuario que selecciono
        /// </summary>
        /// <param name="sender">object sender</param>
        /// <param name="e">DirectEventArgs e</param>
        protected void Muestra_Dat_User(object sender, DirectEventArgs e)
        {
            CellSelectionModel UserSel = this.ListaUsuarios.SelectionModel.Primary as CellSelectionModel;
            Controles.Usuario_Com DatUser = new Controles.Usuario_Com();
            //  Consulta los datos del usuario consumiendo el metodo ConsultaDatUsuario
            DatUser = Acceso.ConsultaDatUsuario(Convert.ToInt32(UserSel.SelectedCell.RecordID));

            //  Guarda los datos del usuario en variables de sesion
            Session["UserSel"] = DatUser.Usuario_Sim.Id_Usuario;
            this.dpfUser.Text = Convert.ToString(Session["UserSel"]);
            Session["UserSuc"] = DatUser.Id_Sucursal;
            this.txtNombre1.Text = DatUser.Nombre_1;
            this.txtNombre2.Text = DatUser.Nombre_2;
            this.txtApellido1.Text = DatUser.Apellido_Pat;
            this.txtApellido2.Text = DatUser.Apellido_Mat;
            this.txtEmail.Text = DatUser.Correo;
            this.txtUser.Text = DatUser.Usuario_Sim.Usuario;
            this.cbEstatus.SetRawValue(DatUser.Usuario_Sim.Estado_User);
            this.cbCoop.SetRawValue(DatUser.Usuario_Sim.Coop);
            this.cbPlaza.SetRawValue(DatUser.Usuario_Sim.Plaza);
            this.cbSucursal.SetRawValue(DatUser.Usuario_Sim.Sucursal);
            if (DatUser.Activo == true)
            {
                this.chkUserActivo.Checked = true;
            }
            else
            {
                this.chkUserActivo.Checked = false;
            }
            EstadoBotones(3);
        }
コード例 #38
0
        /// <summary>
        /// Evento de clic del botón Guardar
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void imgbtnGuardar_Click(object sender, DirectEventArgs e)
        {
            //1. Obtener datos de la Forma y saber si es edición o nuevo
            string strRegistro = e.ExtraParams["registro"];

            //2. Por cada elemento del submit de la Forma detectar el campo y asignarlo al objeto correspondiente
            Dictionary<string, string> dRegistro = JSON.Deserialize<Dictionary<string, string>>(strRegistro);
            CodigoPostal cp = new CodigoPostal();
            foreach (KeyValuePair<string, string> sd in dRegistro)
            {
                switch (sd.Key)
                {
                    case "cmbEstado":
                        cp.Estado = sd.Value;
                        break;
                    case "cmbMunicipio":
                        cp.Municipio = sd.Value;
                        break;
                    case "cmbColonia":
                        cp.Colonia = sd.Value;
                        break;
                    case "txtCP":
                        cp.Numero = Convert.ToInt32(sd.Value);
                        break;
                }
            }

            //3. Insertar en la base de datos
            cp.Id = CodigoPostalBusiness.Insertar(cp);
            e.ExtraParamsResponse.Add(new Ext.Net.Parameter("data", cp.Id, ParameterMode.Value));
        }
コード例 #39
0
        protected void BotonConsultar_OnClick(object sender, DirectEventArgs e)
        {
            try
            {
                if (CheckboxTodos.Checked == false)
                {
                    List<string> tipos = new List<string>(ComboBox1.SelectedItems.Count);
                    foreach (Ext.Net.SelectedListItem i in ComboBox1.SelectedItems)
                    {
                        tipos.Add(i.Text);
                    }

                    Session["Report"] =
                        IU.Contabilidad.ContabilidadGlobal.Admin.ConsultaLibroDiario(
                            tipos.ToArray(),
                            DateFieldDesde.SelectedDate,
                            DateFieldHasta.SelectedDate);
                }
                else
                {
                    Session["Report"] = 
                        IU.Contabilidad.ContabilidadGlobal.Admin.ConsultaLibroDiario(
                            null,
                            DateFieldDesde.SelectedDate,
                            DateFieldHasta.SelectedDate);
                }

                Response.Redirect("LibroDiario.aspx");
            }
            catch (Exception ex)
            {
                IU.UIHelper.MostrarExcepcion(ex, "Error");
            }
        }
コード例 #40
0
 protected void btnNovo_Click(object sender, DirectEventArgs e)
 {
     base.AcaoTela = Common.AcaoTela.Inclusao;
     winSistema.Title = "Cadastrando Sistema";
     LimparCampos();
     winSistema.Show((Control)sender);
 }
コード例 #41
0
    protected void btnGuardarDetalleArticulo(object sender, DirectEventArgs e)
    {
        try
        {
            string ar_serie = this.txtSerie.Text;
            string ar_nombre = this.txtEquipo.Text;
            string ar_descripcion = this.txtDescripcion.Text;
            int ar_marca = int.Parse(this.sltMarca.SelectedItem.Value);
            string ar_modelo = this.txtModelo.Text;
            string ar_color = this.txtColor.Text;
            int ar_laboratorio = int.Parse(this.sltLaboratorio.SelectedItem.Value);
            decimal ar_multa = decimal.Parse(this.txtMulta.Text);

            articuloX.Update_Articulo(ar_serie, ar_nombre, ar_descripcion, ar_marca, ar_modelo, ar_color, ar_laboratorio, ar_multa,ar_serie);
            this.GridStore.Reload();

            this.ArticuloVentana.Hide();
        }
        catch (Exception)
        {
            Ext.Net.Notification.Show(new NotificationConfig
            {
                Title = "Error al guardar",
                Icon = Icon.Error,
                Width = 400,
                Height = 100,
                Html = "Ingreso de datos incorretos",
                Shadow = true,

            });
        }
    }
コード例 #42
0
        public void Cell_Click(object sender, DirectEventArgs e)
        {
            CellSelectionModel sm = this.AdmonModelos.SelectionModel.Primary as CellSelectionModel;
            Session["idModelo"] = Convert.ToString(sm.SelectedCell.RecordID);
            OBD_danos.DatosModelo modelo = new OBD_danos.DatosModelo();

            modelo = wsData.AdminCatRegresaModelo(Convert.ToInt32(Session["idModelo"]));

            dpfModelo.Text = modelo.IdModelo;
            txtIdPRYBE.Text = modelo.IdPrybe;
            cbMarca.SetValue(Convert.ToInt32(modelo.IdMarca));
            txtDescrip.Text = modelo.Descripcion;
            sfAno.SetValue(modelo.Ano);
            if (modelo.ValorComercial != "") { txtVC.Text = modelo.ValorComercial; } else { txtVC.Text = "0"; }
            txtABA.Text = modelo.ClaveAba;
            txtPrimero.Text = modelo.ClavePrimero;
            txtQualitas.Text = modelo.ClaveQualitas;
            txtIDMultiva.Text = modelo.Multiva.Id;
            txtMarMultiva.Text = modelo.Multiva.Marca;
            txtSMarMultiva.Text = modelo.Multiva.SubMarca;
            txtDescMultiva.Text = modelo.Multiva.DescSubMarca;
            txtIDGNP.Text = modelo.Gnp.Id;
            txtMarGNP.Text = modelo.Gnp.Marca;
            txtDescGNP.Text = modelo.Gnp.Descripcion;
            txtANA.Text = modelo.ClaveAna;
            txtMAPFRE.Text = modelo.ClaveMapfre;
            txtPotosi.Text = modelo.ClavePotosi;
            txtZurich.Text = modelo.ClaveZurich;
            txtAXA.Text = modelo.ClaveAxa;

            btnModificar.Disabled = false;
        }
コード例 #43
0
 protected void btnNovo_Click(object sender, DirectEventArgs e)
 {
     base.AcaoTela = Common.AcaoTela.Inclusao;
     winMensagem.Title = "Enviando Mensagem";
     LimparCampos();
     winMensagem.Show((Control)sender);
 }
コード例 #44
0
ファイル: mailtest.aspx.cs プロジェクト: MasterKongKong/eReim
 protected void SendMail(object sender, DirectEventArgs e)
 {
     try
     {
         DIMERCO.SDK.MailMsg mail = new DIMERCO.SDK.MailMsg();
         mail.Title = "Dimerco eReimbursement";
         mail.FromDispName = "eReimbursement";
         mail.From = "*****@*****.**";
         mail.To = "[email protected],[email protected]";
         mail.Body = "<div><table style='border-collapse: collapse;'><tr><td nowrap='nowrap'>所有跟Shipment相关的文件不能从Value+中导出的全部扫描后传入Document Cloud中,以备任何时间查看或者下载打印;所有跟Shipment相关的文件不能从Value+中导出的全部扫描后传入Document Cloud中,以备任何时间查看或者下载打印;所有跟Shipment相关的文件不能从Value+中导出的全部扫描后传入Document Cloud中,以备任何时间查看或者下载打印;所有跟Shipment相关的文件不能从Value+中导出的全部扫描后传入Document Cloud中,以备任何时间查看或者下载打印;</td><td>13</td></tr><tr><td>22</td><td>23</td></tr></table></div>";
         mail.Send();
         X.Msg.Show(new MessageBoxConfig
         {
             Title = "Message",
             Message = "发送成功",
             Buttons = MessageBox.Button.OK,
             Icon = MessageBox.Icon.WARNING
         });
     }
     catch (Exception)
     {
         
         throw;
     }
 }
コード例 #45
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnGravar_Click(object sender, Ext.Net.DirectEventArgs e)
        {
            //Armazenar na variável FormularioValido se o Form é válido ou não.
            bool FormularioValido = Convert.ToBoolean(e.ExtraParams["FormularioValido"]);

            if (FormularioValido == true)
            {
                //Se a QueryString for NULL, então é uma Inclusão. Caso contrário é uma Alteração.
                if (Request.QueryString.Get("qID") == null && txtIdPessoa.Text == "0")
                {
                    if (txtSenha.Text == txtConfrimSenha.Text)
                    {
                        Incluir();
                    }
                    else
                    {
                        UtilitariosExt UtilExt = new UtilitariosExt();
                        UtilExt.MensagemAlerta("Atenção", "O campo senha deve ser igual ao campo confirmar senha.", "");
                        UtilExt = null;
                    }
                }
                else
                {
                    UtilitariosExt UtilExt = new UtilitariosExt();
                    UtilExt.MensagemAlerta("Confirmação", "Você tem certeza que deseja Alterar o registro?", "CliqueBotaoSimMensagemAlteracao()", "");
                    UtilExt = null;
                }
            }
        }
コード例 #46
0
        protected void btnGravar_Click(object sender, Ext.Net.DirectEventArgs e)
        {
            try
            {
                Usuario UserLogin = (Usuario)Session["Usuario"];

                MailMessage message = new MailMessage();

                message.From = new MailAddress("*****@*****.**");

                //Declarando e Instanciando o Objeto de Negócio e Coleção de Entidades.
                CRJAlunoNegocio objAlunoNegocio = new CRJAlunoNegocio();


                //Atribuindo ao objeto de coleção os registros encontrados na pesquisa.
                DataTable dtAluno = objAlunoNegocio.ObterCRJAluno("", "", "", "", "", IdAluno.ToString());

                DataTable dtResponsaveis = objAlunoNegocio.ObterResponsaveisByAluno(IdAluno);
                if (dtResponsaveis != null && dtResponsaveis.Rows.Count > 0)
                {
                    for (int i = 0; i < dtResponsaveis.Rows.Count; i++)
                    {
                        message.To.Add(new MailAddress(dtResponsaveis.Rows[i]["Email"].ToString()));
                    }

                    //message.CC.Add(new MailAddress("*****@*****.**"));

                    message.Subject = txtAssunto.Text;
                    message.Body   += txtMensagem.Text;
                    message.Body   += "<br/><br/>";
                    message.Body   += UserLogin.DadosPessoais.Nome;
                    message.Body   += "<br/>";
                    message.Body   += UserLogin.DadosPessoais.Email;
                    message.CC.Add(UserLogin.DadosPessoais.Email);
                    message.IsBodyHtml = true;



                    SmtpClient client = new SmtpClient("smtp.gmail.com");
                    client.Port = 587;
                    //client.Credentials = new NetworkCredential("*****@*****.**", "senha");
                    client.EnableSsl = true;

                    client.Send(message);

                    UtilitariosExt UtilExt = new UtilitariosExt();
                    UtilExt.MensagemAlerta("Enviado", "Email enviado com sucesso", "");
                    UtilExt = null;

                    CliqueMensagemIncluidoComSucesso();
                }
            }
            catch (Exception ex)
            {
                UtilitariosExt UtilExt = new UtilitariosExt();
                UtilExt.MensagemAlerta("Enviado", "Email enviado com sucesso", "CliqueMensagemIncluidoComSucesso()");
                UtilExt = null;
            }
        }
コード例 #47
0
        protected void btnGetList_DirectClick(object sender, Ext.Net.DirectEventArgs e)
        {
            //filteleme kullanılarak yapılan listeleme
            Store str = grdList.GetStore();

            str.DataSource = new User().getList(txtFilter.Text, Convert.ToInt32(cbUserType.Value), -1);
            str.DataBind();
        }
コード例 #48
0
    protected void btnGetAccounts_DirectClick(object sender, Ext.Net.DirectEventArgs e)
    {
        Bus        bus     = new Bus();
        BusService service = new BusService();
        Store      str     = grdBus.GetStore();

        str.DataSource = Database.Session.QueryOver <Bus>().Where(x => x.state == true).List();
        str.DataBind();
    }
コード例 #49
0
    protected void btnGetAccounts_DirectClick(object sender, Ext.Net.DirectEventArgs e)
    {
        Station        station = new Station();
        StationService service = new StationService();
        Store          str     = grdStation.GetStore();

        str.DataSource = Database.Session.QueryOver <Station>().Where(x => x.state == true).List();
        str.DataBind();
    }
コード例 #50
0
        //Botão CadastrarNovo.
        protected void btnCadastrarNovo_DirectClick(object sender, Ext.Net.DirectEventArgs e)
        {
            //Chama a página de Cadastro de CRJProduto.
            string URLModal = "CadastroProduto.aspx?qTela=Incluir";


            //TODO: Informe no parâmetro Altura e Largura no método ExibirModalCadastro, os valores compativeis com a tela de cadastro. O tamanho máximo para a Intranet é: 520, 760
            ExibirModalCadastro("Incluir", URLModal, 550, 720, true, true, Icon.Add);
        }
コード例 #51
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnPesquisar_DirectClick(object sender, Ext.Net.DirectEventArgs e)
        {
            Usuario objUsuario = (Usuario)Session["Usuario"];

            if (objUsuario != null && objUsuario.DadosPessoais != null)
            {
                PopularGrid(txtNome.Text.Trim(), txtEmail.Text.Trim(), txtCPF.Text.Trim(), txtTelefone.Text.Trim(), txtRA.Text.Trim());
            }
        }
コード例 #52
0
    //查询
    protected void btnInquiry_DirectClick(object sender, Ext.Net.DirectEventArgs e)
    {
        DataTable dt = Bind();

        if (dt.Rows.Count == 0)
        {
            X.Msg.Alert("提示", "所查询部门没有数据,请添加数据").Show();
        }
    }
コード例 #53
0
        protected void btnGravar_Click(object sender, Ext.Net.DirectEventArgs e)
        {
            //Armazenar na variável FormularioValido se o Form é válido ou não.
            bool FormularioValido = Convert.ToBoolean(e.ExtraParams["FormularioValido"]);

            if (FormularioValido == true)
            {
                Incluir();
            }
        }
コード例 #54
0
 protected void btnGetList_DirectClick(object sender, Ext.Net.DirectEventArgs e)
 {
     //listCourse için
     if (CourseTime.IsDeleted != true)
     {
         Store str = grdList.GetStore();
         str.DataSource = new Course().getList(1, txtFilter.Text);
         str.DataBind();
     }
 }
コード例 #55
0
        protected void btnModificarSocio_DirectClick(object sender, Ext.Net.DirectEventArgs e)
        {
            if (this.txtNombre.Text != "" && this.txtApellidoPat.Text != "" && this.dteFechaN.Text != "" && this.dteFechaI.Text != "" && this.txtCalle.Text != "" && this.txtNoExt.Text != "")
            {
                if (this.rdoMasculino.Checked == true)
                {
                    Session["Sexo"] = 1;
                }
                else
                {
                    Session["Sexo"] = 0;
                }

                DateTime hoy    = new DateTime();
                DateTime actual = new DateTime();
                hoy    = DateTime.Now;
                actual = DateTime.Today;
                int ano = DateTime.Now.Year;
                fechaNac = Convert.ToDateTime(this.dteFechaN.Text);
                fechaIng = Convert.ToDateTime(this.dteFechaI.Text);

                if (DateTime.Compare(fechaIng, actual) > 0 || DateTime.Compare(fechaNac, actual) > 0)
                {
                    X.Msg.Alert("Error", "La fecha es mayor a la actual").Show();
                }

                else
                {
                    ErrorOper = socio.InsertSocioBeneficio(Convert.ToString(Session["NumeroSocio"]), this.txtNombre.Text.ToUpper(), this.txtNombre2.Text.ToUpper(), this.txtApellidoPat.Text.ToUpper(),
                                                           this.txtApellidoMat.Text.ToUpper(), fechaNac.ToString("dd/MM/yyyy"), fechaIng.ToString("dd/MM/yyyy"), (int)(Session["Sexo"]), "", "", "",
                                                           Convert.ToInt32(this.cmbOcupacion.SelectedItem.Value), Convert.ToInt32(this.cmbEdoCivil.SelectedItem.Value),
                                                           Convert.ToInt32(Session["Sucursal"]), Convert.ToString(ano), 1, this.txtCalle.Text.ToUpper(),
                                                           this.txtNoExt.Text.ToUpper(), this.txtNoInt.Text.ToUpper(), 1, Convert.ToInt32(Session["Usuario"]));

                    Session["IdSiniestro"] = dfNumeroSiniestro2.Text = ErrorOper.Mensaje;

                    this.pnlSocio.Disabled  = true;
                    this.pnlSocio.Collapsed = true;

                    this.paneLol.Disabled = false;
                    this.pnlProteccionAhorros.Disabled   = false;
                    this.pnlProteccionPrestamos.Disabled = false;
                }

                this.btnCancelarRegistroSocio.Disabled = true;
                this.btnModificarSocio.Disabled        = true;


                int noSiniestro = Convert.ToInt32(Session["IdSiniestro"]);
            }
            else
            {
                X.Msg.Alert("Aviso", "Faltan algunos campos de llenado").Show();
            }
        }
コード例 #56
0
        protected void Export_Click(object sender, Ext.Net.DirectEventArgs e)
        {
            try
            {
                //导出存放路径
                string fileName = string.Format("Exports_{0}_{1}.xls", DateTime.Now.ToString("yyyy-MM-dd-HH-mm-ss"), CommonHelper.GenerateRandomDigitCode(4));
                string filePath = string.Format("{0}Upload\\PostListExport\\{1}", HttpContext.Current.Request.PhysicalApplicationPath, fileName);

                string paramWantID       = this.txtWantID.Text.Trim();
                string paramOrderCode    = this.txtOrderCode.Text.Trim();
                string paramCustomerName = this.txtCustomerName.Text.Trim();
                string paramCustomerTel  = this.txtCustomerTel.Text.Trim();
                string start             = dfStart.Text.Trim();
                string end = dfEnd.Text.Trim();
                int    paramIsArrangindex  = this.cmIsArrange.SelectedIndex;
                int    paramIsArrange      = int.Parse(this.cmIsArrange.Items[paramIsArrangindex].Value);
                int    paramIsInstallindex = this.cmIsInstall.SelectedIndex;
                int    paramIsInstall      = int.Parse(this.cmIsInstall.Items[paramIsInstallindex].Value);
                //项目名称
                int ddXMProject2 = -1;
                if (this.ddXMProject2.Value.ToString() != "")
                {
                    ddXMProject2 = Convert.ToInt32(this.ddXMProject2.Value.ToString().Trim());
                }
                int    ddlNick2 = Convert.ToInt32(this.ddlNick2.Value.ToString()); //店铺
                string nickids  = "";                                              //店铺
                if (ddlNick2 == 99)                                                //某个项目店铺权限,选择有权限的店铺
                {
                    var nickList = base.XMOrderInfoAPIService.GetXMNickListSS("", -1, ddXMProject2, HozestERPContext.Current.User.CustomerID, 0);
                    for (int i = 0; i < nickList.Count; i++)
                    {
                        nickids = nickids + nickList[i].nick_id + ",";
                    }
                    if (nickids.Length > 0)
                    {
                        nickids = nickids.Substring(0, nickids.Length - 1);
                    }
                }
                else
                {
                    nickids = ddlNick2.ToString();
                }
                //var paramList = base.XMInstallationListService.SearchXMInstallationList(paramWantID, paramOrderCode, paramCustomerName, paramCustomerTel, paramIsArrange, paramIsInstall);
                var paramList = base.XMInstallationListService.SearchXMInstallationList2(paramWantID, paramOrderCode, paramCustomerName, paramCustomerTel, paramIsArrange, paramIsInstall, ddXMProject2, nickids, start, end);//查询物流单list

                base.ExportManager.ExportPostListFromInstallation(filePath, paramList);

                CommonHelper.WriteResponseXls(filePath, fileName);
            }
            catch (Exception exc)
            {
                ProcessException(exc);
            }
        }
コード例 #57
0
 protected void Continuar_DirectClick(object sender, Ext.Net.DirectEventArgs e)
 {
     if (getCompetencia() != null)
     {
         Response.Redirect("../Profesional/CrearDetalle.aspx");
     }
     else
     {
         MsgError();
     }
 }
コード例 #58
0
 protected void btnImport_DirectClick(object sender, Ext.Net.DirectEventArgs e)
 {
     if (FUFEXC.HasFile)
     {
         string connStr = ConfigurationManager.ConnectionStrings["ConChk"].ToString();
     }
     else
     {
         X.Msg.Alert("提示", "请先选择!");
     }
 }
コード例 #59
0
        protected void btnGravar_Click(object sender, Ext.Net.DirectEventArgs e)
        {
            //Armazenar na variável FormularioValido se o Form é válido ou não.
            bool FormularioValido = Convert.ToBoolean(e.ExtraParams["FormularioValido"]);

            if (FormularioValido == true)
            {
                UtilitariosExt UtilExt = new UtilitariosExt();
                UtilExt.MensagemAlerta("Confirmação", "Você tem certeza que deseja Alterar o registro?", "CliqueBotaoSimMensagemAlteracao()", "");
                UtilExt = null;
            }
        }
コード例 #60
0
        //查詢資料

        //查詢資料
        protected void btnLookup_DirectClick(object sender, Ext.Net.DirectEventArgs e)
        {
            string Find_SYSTEM_ID  = "WB";
            string Find_USER_NOTES = this.Find_USER_NOTES.Text;
            string Find_MAIL_ADS   = this.Find_MAIL_ADS.Text;

            _msg = "";
            LookupReFlash(Find_SYSTEM_ID, Find_USER_NOTES, Find_MAIL_ADS);
            String counts = DBProcess_mail.Count(Find_SYSTEM_ID, Find_USER_NOTES, Find_MAIL_ADS, ref _msg);

            X.MessageBox.Alert("提示", " After search , all have   " + counts + " counts ").Show();
        }