Пример #1
0
 protected void CallbackPanel_Callback(object sender, DevExpress.Web.CallbackEventArgsBase e)
 {
     if (!string.IsNullOrEmpty(e.Parameter))
     {
         passedInfo.InnerText = "Passed information: \"" + e.Parameter + "\"";
     }
 }
Пример #2
0
        protected void cmbVehicleNumber_Callback(object sender, DevExpress.Web.CallbackEventArgsBase e)
        {
            int param = Convert.ToInt32(e.Parameter);

            cmbVehicleNumber.DataSource = ListVehicle(param);
            cmbVehicleNumber.DataBind();
        }
Пример #3
0
        protected void ASPxCallbackPanel1_Callback(object sender, DevExpress.Web.CallbackEventArgsBase e)
        {
            if (!ASPxCallbackPanel1.IsCallback)
            {
                return;
            }

            string[] parameters = e.Parameter.Split(';');
            if (parameters.Length < 1)
            {
                return;
            }

            string commandName = parameters[0];

            if (commandName == "DeleteAppointmentCommand")
            {
                int value = Convert.ToInt32(parameters[1]);
                ASPxScheduler1.Storage.Appointments.Remove(ASPxScheduler1.Storage.Appointments.GetAppointmentById(value));
                ASPxScheduler1.DataBind();
                AgendaViewControl1.ReloadData();
            }
            else if (commandName == "SwitchViewToAgendaView")
            {
                DateTime selectedIntervalStart = ASPxScheduler1.ActiveView.GetVisibleIntervals().Start;
                DateTime intervalStart         = new DateTime(selectedIntervalStart.Year, selectedIntervalStart.Month, 1);
                AgendaViewControl1.SelectedInterval = new TimeInterval(intervalStart, intervalStart.AddMonths(1));
            }
        }
Пример #4
0
 protected void ASPxCallbackPanel_pota_genel_Callback(object sender, DevExpress.Web.CallbackEventArgsBase e)
 {
     if (e.Parameter == "pota_ocagi_genel_liste")
     {
         pota_ocak_genel_liste();
     }
 }
 protected void ASPxCallbackPanel1_Callback(object sender, DevExpress.Web.CallbackEventArgsBase e)
 {
     if (e.Parameter == "lvl1")
     {
         FillCommonTypes(Convert.ToInt16(drplvl1.Value));
     }
 }
Пример #6
0
 protected void cpEditorEmpresas_Callback(object sender, DevExpress.Web.CallbackEventArgsBase e)
 {
     using (UnidadDeTrabajo bd = new UnidadDeTrabajo())
     {
         cmbEstado.DataSource = bd.Estado.ObtenerEstado_x_Tipo(4);
         cmbEstado.DataBind();
         Empresa empresa_a_editar = new Empresa();
         if (campoO.Text == "1")
         {
             actualizar_datos_de_edicion_y_de_lectura(int.Parse(e.Parameter));
         }
         else
         {
             txtRUC.Text         = "";
             txtRazonSocial.Text = "";
             txtTelefono.Text    = "";
             txtDireccion.Text   = "";
             txtEmail.Text       = "";
             txtId.Text          = "";
             txtPagWeb.Text      = "";
             cmbProveedor.Value  = null;
             cmbEstado.Value     = 8;
         }
     }
 }
        protected void cbpThanhToan_Callback(object sender, DevExpress.Web.CallbackEventArgsBase e)
        {
            switch (e.Parameter)
            {
            case "PhieuTT":
                int IDNhapKho = int.Parse(ccbPhieuThanhToan.Value.ToString());
                var PhieuTT   = DBDataProvider.DB.kNhapKhos.Where(x => x.IDNhapKho == IDNhapKho).FirstOrDefault();
                txtSoTienDaTT.Text  = PhieuTT.ThanhToan.ToString();
                speSoTienTT.Text    = PhieuTT.CongNo.ToString();
                speSoTienTT.Enabled = false;
                ListPhieuThanhToan(Convert.ToInt32(ccbKhachHang.Value.ToString()));
                memoNoiDungTT.Text += " " + PhieuTT.CongNo.ToString() + " ĐỒNG";
                break;

            case "Customer":
                //ccbPhieuThanhToan.SelectedIndex = 0;
                speSoTienTT.Text = "0";
                int IDKhachHang = int.Parse(ccbKhachHang.Value.ToString());
                var KhachHang   = DBDataProvider.DB.khKhachHangs.Where(x => x.IDKhachHang == IDKhachHang).FirstOrDefault();
                txtCongNoHienTai.Text  = KhachHang.CongNo.ToString();
                ccbPhieuThanhToan.Text = "";
                ListPhieuThanhToan(IDKhachHang);
                break;

            case "Review": CreateReportReview(); break;

            default:
                LuuThanhToan();
                Reset();
                break;
            }
        }
Пример #8
0
 protected void panel_Callback(object source, DevExpress.Web.CallbackEventArgsBase e)
 {
     try
     {
         panel.JSProperties["cp_action"] = "";
         if (e.Parameter.StartsWith("s:"))
         {
             USC_paraminput.savepending(null);
             panel.JSProperties["cp_action"] = "s";
         }
         else if (e.Parameter.StartsWith("r:"))
         {
             USC_paraminput.retrieve(e.Parameter.Substring(2));
             panel.JSProperties["cp_action"] = "r";
         }
         else if (e.Parameter.StartsWith("rp:"))
         {
             USC_paraminput.retrievepending(e.Parameter.Substring(3));
             panel.JSProperties["cp_action"] = "rp";
         }
     }
     catch (Exception ex)
     {
         panel.JSProperties["cp_alert"] = ex.Message;
     }
 }
Пример #9
0
 protected void panelFile_Callback(object source, DevExpress.Web.CallbackEventArgsBase e)
 {
     if (e.Parameter.StartsWith("d:"))
     {
         try
         {
             string   filename = e.Parameter.Substring(2);
             string   fullpath = Server.MapPath(SvrPathUrl + filename);
             FileInfo fi       = new FileInfo(fullpath);
             fi.Delete();
         }
         catch (Exception ex)
         {
             string errmsg = "";
             if (ex.Message.IndexOf("Last Query:") > 0)
             {
                 errmsg = ex.Message.Substring(0, ex.Message.IndexOf("Last Query:"));
             }
             else
             {
                 errmsg = ex.Message;
             }
             panelFile.JSProperties["cp_alert"] = errmsg;
         }
     }
     else if (Session["errmsg"] != null)
     {
         panelFile.JSProperties["cp_alert"] = (string)Session["errmsg"];
         Session.Remove("errmsg");
     }
     bindfiles();
 }
Пример #10
0
        protected void DetailsCallbackPanel_Callback(object sender, DevExpress.Web.CallbackEventArgsBase e)
        {
            var args = DemoUtils.DeserializeCallbackArgs(e.Parameter);

            if (args.Count == 0)
            {
                return;
            }
            var callbackName = args[0];

            if (callbackName == "SaveEditForm")
            {
                GetEditForm(args[1]).SaveChanges(args[2]);
            }
            if (callbackName == "DeleteEntry")
            {
                long entryID = long.Parse(args[2]);
                if (entryID == DataProvider.emptyEntryID)
                {
                    return;
                }
                switch (args[1])
                {
                    //case "Task":
                    //    DataProvider.DeleteTask(entryID);
                    //    break;
                    //case "Evaluation":
                    //    DataProvider.DeleteEvaluation(entryID);
                    //    break;
                }
            }
            UpdateDetail();
        }
Пример #11
0
        protected void cpValidateUser_Callback(object sender, DevExpress.Web.CallbackEventArgsBase e)
        {
            Usuario usuario = new Usuario();

            using (var ut = new UnidadDeTrabajo())
            {
                usuario = ut.Usuario.ObtenerUsuarioPorNombreMasContraseña(txtUsuario.Text, txtPass.Text);
                if (usuario != null)
                {
                    Session["UserActive"]       = usuario.Nombre;
                    Session["IdUserActive"]     = usuario.id;
                    Session["IdTipoUserActive"] = usuario.IdTipoUsuario;
                    List <string> tipoCambio = ObtenerTipoDeCambio();
                    if (tipoCambio != null)
                    {
                        if (tipoCambio.Count > 0)
                        {
                            if (!string.IsNullOrEmpty(tipoCambio.ElementAt(0)))
                            {
                                ut.actualizarTipoCambio(double.Parse(tipoCambio.ElementAt(0)), double.Parse(tipoCambio.ElementAt(1)));
                            }
                        }
                    }
                    Response.RedirectLocation = "PaginaPrincipal.aspx";
                }
                else
                {
                    cpValidateUser.JSProperties["cpError"] = "El usuario o password ingresados son incorrectos!";
                }
            }
        }
 protected void ASPxScheduler1_CustomCallback(object sender, DevExpress.Web.CallbackEventArgsBase e)
 {
     if (ASPxScheduler1.SelectedAppointments.Count > 0)
     {
         ASPxScheduler1.SelectedAppointments[0].CustomFields["ApptCustomField"] = e.Parameter.Replace("Item", "value");
     }
 }
Пример #13
0
        protected void mainPanel_Callback(object source, DevExpress.Web.CallbackEventArgsBase e)
        {
            NameValueCollection nvcAuto = new NameValueCollection();

            List <object> regno = grid.GetSelectedFieldValues("__KeyField");

            for (int i = 0; i < regno.Count; i++)
            //for (int i = 0; i < selList.Items.Count; i++)
            {
                switch (e.Parameter)
                {
                case "send":
                    string reffnumber = regno[i].ToString();

                    DataTable dt = conn.GetDataTable("select appid from applicant_bkp where reffnumber = @1",
                                                     new object[] { reffnumber }, dbtimeout);
                    string appid = "";
                    for (int k = 0; k < dt.Rows.Count; k++)
                    {
                        appid = dt.Rows[k]["appid"].ToString();
                        conn.ExecReader("exec USP_RESTORE_DATA @1, @2, @3",
                                        new object[] { appid, USERID, "1" }, dbtimeout);
                    }

                    break;
                }
            }

            grid.Selection.UnselectAll();
            ListSys.gridBind(grid, (string)ViewState["strSQL"], UC_ListFilter1.paramFilter, UC_ListFilter1.strFilter, conn);
        }
Пример #14
0
        protected void dxComboBox_Callback(object source, DevExpress.Web.CallbackEventArgsBase e)
        {
            DevExpress.Web.ASPxComboBox oCtrlASPxComboBox = (source as DevExpress.Web.ASPxComboBox);
            string FieldReff = nvcFilterReff[oCtrlASPxComboBox.ID];

            staticFramework.reff(oCtrlASPxComboBox, FieldReff, paramFilter, conn);
        }
Пример #15
0
 protected void ASPxCallbackPanel_hurda_Callback(object sender, DevExpress.Web.CallbackEventArgsBase e)
 {
     if (e.Parameter == "hurda_liste")
     {
         hurda_liste();
     }
 }
Пример #16
0
 protected void cpEditorClientes_Callback(object sender, DevExpress.Web.CallbackEventArgsBase e)
 {
     using (UnidadDeTrabajo bd = new UnidadDeTrabajo())
     {
         cmbDepartamento.DataSource = bd.Departamento.Obtener();
         cmbDepartamento.DataBind();
         //cmbProvincia.ReadOnly = true;
         Cliente cliente_a_editar = new Cliente();
         if (campoO.Text == "1")
         {
             actualizar_datos_de_edicion_y_de_lectura(int.Parse(e.Parameter));
         }
         else
         {
             txtNombre.Text          = "";
             txtApPaterno.Text       = "";
             txtApMaterno.Text       = "";
             deFechaNacimiento.Text  = "";
             txtDni.Text             = "";
             txtRuc.Text             = "";
             txtTelefono.Text        = "";
             txtDireccion.Text       = "";
             txtEmail.Text           = "";
             txtId.Text              = "";
             cmbEstado.Value         = 15;
             cmbDepartamento.Value   = 6;
             cmbProvincia.DataSource = bd.Provincia.ObtenerProvinciasPorDepartamento(int.Parse(cmbDepartamento.Value.ToString()));
             cmbProvincia.DataBind();
             cmbProvincia.Value = 54;
         }
     }
 }
Пример #17
0
        protected void cbpThanhToan_Callback(object sender, DevExpress.Web.CallbackEventArgsBase e)
        {
            switch (e.Parameter)
            {
            case "PhieuTT":
                int IDPhieuThanhToan = int.Parse(ccbPhieuThanhToan.Value.ToString());
                var PhieuTT          = DBDataProvider.DB.ghPhieuGiaoHangs.Where(x => x.IDPhieuGiaoHang == IDPhieuThanhToan).FirstOrDefault();
                txtSoTienDaTT.Text = PhieuTT.ThanhToan.ToString();
                speSoTienTT.Text   = PhieuTT.ConLai.ToString();
                ListPhieuThanhToan(Convert.ToInt32(ccbKhachHang.Value.ToString()));
                memoNoiDungTT.Text += PhieuTT.ConLai.ToString() + " ĐỒNG";
                break;

            case "Customer":
                //ccbPhieuThanhToan.SelectedIndex = 0;
                speSoTienTT.Text = "0";
                int IDKhachHang = int.Parse(ccbKhachHang.Value.ToString());
                var KhachHang   = DBDataProvider.DB.khKhachHangs.Where(x => x.IDKhachHang == IDKhachHang).FirstOrDefault();
                txtCongNoHienTai.Text  = KhachHang.CongNo.ToString();
                ccbPhieuThanhToan.Text = "";
                ListPhieuThanhToan(IDKhachHang);
                break;

            case "Review": CreateReportReview(); break;

            case "redirect": DevExpress.Web.ASPxWebControl.RedirectOnCallback("~/Pages/ThanhToan/LapThanhToan.aspx"); break;

            default:
                LuuThanhToan();
                Reset();
                break;
            }
        }
Пример #18
0
 protected void ASPxCallbackPanel_po_alyaj_Callback(object sender, DevExpress.Web.CallbackEventArgsBase e)
 {
     if (e.Parameter == "po_alyaj_liste")
     {
         po_alyaj_liste();
     }
 }
Пример #19
0
 protected void panel_Callback(object source, DevExpress.Web.CallbackEventArgsBase e)
 {
     try
     {
         panel.JSProperties["cp_action"] = "";
         if (e.Parameter.StartsWith("s:"))
         {
             panel.JSProperties["cp_action"] = "s";
             USC_paraminput1.savepending(null);
         }
         else if (e.Parameter.StartsWith("r:"))
         {
             panel.JSProperties["cp_action"] = "r";
             USC_paraminput1.retrieve(e.Parameter.Substring(2));
         }
         else if (e.Parameter.StartsWith("rp:"))
         {
             panel.JSProperties["cp_action"] = "rp";
             USC_paraminput1.retrievepending(e.Parameter.Substring(3));
         }
     }
     catch (Exception ex)
     {
         string errmsg = ex.Message;
         if (errmsg.IndexOf("Last Query") > 0)
         {
             errmsg = errmsg.Substring(0, errmsg.IndexOf("Last Query"));
         }
         panel.JSProperties["cp_alert"] = errmsg;
     }
 }
Пример #20
0
 protected void ASPxCallbackPanel_sarfmalzeme_Callback(object sender, DevExpress.Web.CallbackEventArgsBase e)
 {
     if (e.Parameter == "sarf_liste")
     {
         sarf_liste();
     }
 }
Пример #21
0
    protected void ddlVisit_Callback(object sender, DevExpress.Web.CallbackEventArgsBase e)

    {
        string[]          clientData         = e.Parameter.Split(new char[] { '-' });
        Bill_Sys_Calender _bill_Sys_Calender = new Bill_Sys_Calender();

        ddlVisit.JSProperties.Add("cpIsValid", !_bill_Sys_Calender.CheckVisitForVisitType(clientData[2], clientData[1], clientData[0], ((Bill_Sys_BillingCompanyObject)System.Web.HttpContext.Current.Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID));
    }
 protected void ASPxCallbackPanel_URETIM_Callback(object sender, DevExpress.Web.CallbackEventArgsBase e)
 {
     if (e.Parameter == "uretim_kayit")
     {
         uretim_kayit_duzenleme();
         raporu_al();
     }
 }
Пример #23
0
    protected void сallbackPanel_Callback(object sender, DevExpress.Web.CallbackEventArgsBase e)
    {
        string[] parameters        = e.Parameter.Split('|');
        string   fieldName         = parameters[0];
        bool     isShiftKeyPressed = Boolean.Parse(parameters[1]);

        ProductsReport.SortBy(fieldName, isShiftKeyPressed);
    }
Пример #24
0
 protected void cbChart_Callback(object sender, DevExpress.Web.CallbackEventArgsBase e)
 {
     if (e.Parameter == "Load")
     {
         btChart.DataSource = GetBootstrapChartData();
         btChart.DataBind();
     }
 }
Пример #25
0
        protected void cmbDriver_Callback(object sender, DevExpress.Web.CallbackEventArgsBase e)
        {
            int param = Convert.ToInt32(e.Parameter);

            //set driver
            cmbDriver.DataSource = ListDriver(param);
            cmbDriver.DataBindItems();
        }
Пример #26
0
 protected void callpanel_Callback(object sender, DevExpress.Web.CallbackEventArgsBase e)
 {
     string[] para = e.Parameter.Split(':');
     if (para[0] == "SAVE")
     {
         Save();
     }
 }
 protected void cbPanel_Callback(object sender, DevExpress.Web.CallbackEventArgsBase e)
 {
     switch (e.Parameter.Split('|')[0])
     {
     case "actualizarPosicion":
         ActualizarScouting(e.Parameter.Split('|')[1], Convert.ToInt32(e.Parameter.Split('|')[2]), e.Parameter.Split('|')[3]);
         break;
     }
 }
 protected void ASPxCallbackPanel1_Callback(object sender, DevExpress.Web.CallbackEventArgsBase e)
 {
     string[] parameters = e.Parameter.Split('|');
     if (parameters[0] == "SaveSelections")
     {
         Session["Combo" + ASPxComboBox1.Value.ToString()] = parameters;
     }
     ASPxCheckBoxList1.DataBind();
 }
Пример #29
0
        protected void cbpInfo_Callback(object sender, DevExpress.Web.CallbackEventArgsBase e)
        {
            switch (e.Parameter)
            {
            case "refresh": BindGrid(); break;

            default: break;
            }
        }
Пример #30
0
        protected void cbpInfo_Callback(object sender, DevExpress.Web.CallbackEventArgsBase e)
        {
            switch (e.Parameter)
            {
            case "baocao": XemBaoCao(); break;

            default: break;
            }
        }