protected void dgPermisos_RowUpdating(object sender, DevExpress.Web.Data.ASPxDataUpdatingEventArgs e) { dgPermisos.DoRowValidation(); var index = dgPermisos.EditingRowVisibleIndex; ((List <BELocalValidar>)Session["Val"])[index].PrjCode = Convert.ToString(e.NewValues["PrjCode"]); ((List <BELocalValidar>)Session["Val"])[index].PrjName = Convert.ToString(e.NewValues["PrjName"]); ((List <BELocalValidar>)Session["Val"])[index].alf_soci = Convert.ToString(e.NewValues["alf_soci"]); ((List <BELocalValidar>)Session["Val"])[index].Permition = Convert.ToBoolean(e.NewValues["Permition"]); var obj = new BEParameters() { UserName = Convert.ToString(cbouser.Value), Socied = Convert.ToString(e.NewValues["alf_soci"]), Project = Convert.ToString(e.NewValues["PrjName"]) }; var obrd = new BRLogin(); var liVal = obrd.Get_SP_VAL_UPDATE_LOCAL(obj); if (liVal.Count > 0) { obrd.SET_SP_EDITAR_VALLOCAL(obj, Convert.ToBoolean(e.NewValues["Permition"])); } else { obrd.SET_SP_INSERTAR_LOCAL(obj, Convert.ToBoolean(e.NewValues["Permition"])); } //Set_Promotion(); //Set_LineNum(); //gdvrdr1.JSProperties["cpSubTotal"] = ((List<BEDocumentLine>)Session["rdr1"]).Sum(item => Math.Round(item.LineTotal, 2)); dgPermisos.CancelEdit(); e.Cancel = true; dgPermisos.DataSource = ((List <BELocalValidar>)Session["Val"]); dgPermisos.DataBind(); }
protected void clbSession_Callback(object source, DevExpress.Web.ASPxCallback.CallbackEventArgs e) { try { e.Result = string.Empty; var obrd = new BRLogin(); var brdoc = new BRDocument(); var obec = ((BEParameters)Session["InitPar"]); var obep = new BEParameters(); obep.UserName = UserName.Text; obep.Password = Password.Text; obep.SAPPASSWORD = tbPasswordConfirm.Text; List <BEParameters> lval = obrd.Get_val_usu(obep.UserName.Trim(), obec.Socied, obec.U_DXP_SEDE); if (obep.Password != obep.SAPPASSWORD) { throw new KeyNotFoundException(); } else if (lval.Count == 0) { throw new KeyNotFoundException(); } else { brdoc.Recoverer(obep); e.Result = "PERM#" + "Cambio Exitoso"; } } catch (KeyNotFoundException ex) { e.Result = ex.Message; } }
protected void dgPermisos_CustomCallback(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewCustomCallbackEventArgs e) { var obj = new BEParameters() { UserName = Convert.ToString(cbouser.Value) }; var obrd = new BRLogin(); var va = obrd.Get_SP_LISTARLOCALVAL(obj); Session["Val"] = va; dgPermisos.DataSource = va; dgPermisos.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { var obec = ((BEParameters)Session["InitPar"]); caleInicio.Value = new DateTime(DateTime.Now.Year, 1, 1); caleFin.Value = new DateTime(DateTime.Now.Year, 12, 31); hffechaInicio.Value = ((DateTime)caleInicio.Value).ToString("dd/MM/yyyy"); hffechaFin.Value = ((DateTime)caleFin.Value).ToString("dd/MM/yyyy"); var obep = new BEParameters() { DateIn = (DateTime)caleInicio.Value, DateFi = (DateTime)caleFin.Value, Project = "", Socied = obec.Socied, UserName = obec.UserName, CardCode = "0" }; obrl = new BRLogin(); List <BELogin> olst = obrl.Get_DS_SCSP_LSPJ_OPRJ(obep); var str = String.Join(",", olst.Select(p => p.PrjCode)); obep.Project = str; Session["obep"] = obep; var seleccionar = new BELogin { PrjName = "<Todos>", PrjCode = "-" }; olst.Add(seleccionar); navigateComboBox.DataSource = olst; navigateComboBox.DropDownStyle = DevExpress.Web.ASPxEditors.DropDownStyle.DropDownList; navigateComboBox.DataBind(); navigateComboBox.SelectedIndex = olst.Count() - 1; cargarDasboard(obep); } }
protected void UpdateButton_Click(object sender, EventArgs e) { BEParameters obep = (BEParameters)Session["obep"]; if (navigateComboBox.Value.ToString() == "-") { obrl = new BRLogin(); List <BELogin> olst = obrl.Get_DS_SCSP_LSPJ_OPRJ(obep); var str = String.Join(",", olst.Select(p => p.PrjCode)); obep.Project = str; } else { obep.Project = navigateComboBox.Value.ToString(); } obep.DateIn = (DateTime)caleInicio.Value; obep.DateFi = (DateTime)caleFin.Value; hffechaInicio.Value = ((DateTime)caleInicio.Value).ToString("dd/MM/yyyy"); hffechaFin.Value = ((DateTime)caleFin.Value).ToString("dd/MM/yyyy"); cargarDasboard(obep); }
protected void gdvPermisos_RowUpdating(object sender, ASPxDataUpdatingEventArgs e) { var obec = ((BEParameters)Session["InitPar"]); var index = gdvPermisos.EditingRowVisibleIndex; ((List <BEParameters>)Session["perm"])[index].PERMISOR = Convert.ToString(e.NewValues["PERMISOR"]); gdvPermisos.CancelEdit(); e.Cancel = true; gdvPermisos.DataSource = ((List <BEParameters>)Session["perm"]); gdvPermisos.DataBind(); var x = new BEParameters(); x.PERMISOR = Convert.ToString(e.NewValues["PERMISOR"]); if (x.PERMISOR == "Y") { x.PERMISOR = "1"; } else { x.PERMISOR = "0"; } x.Socied = obec.Socied; x.Project = obec.Project; x.UserName = obec.UserName; x.NOMBRE_OFICIAL = Convert.ToString(e.NewValues["NOMBRE_OFICIAL"]); using (var obrd = new BRDocument()) { obrd.EDIT_PERMISOS(x); } var obrl = new BRLogin(); ((BEParameters)Session["InitPar"]).Permisos = obrl.GET_PERMISOS(((BEParameters)Session["InitPar"])); }
public WebForm1() { obrl = new BRLogin(); }
public Login2() { obrl = new BRLogin(); }