protected void gridDanhSach_RowUpdating(object sender, DevExpress.Web.Data.ASPxDataUpdatingEventArgs e) { string ID = e.Keys[0].ToString(); string TenKhuVuc = e.NewValues["TenKhuVuc"].ToString(); string KyHieu = e.NewValues["KyHieu"].ToString(); //string TyLe = e.NewValues["GiaKhuVuc"].ToString(); string IDChiNhanh = Session["IDChiNhanh"].ToString(); string IDBangGia = e.NewValues["IDBangGia"].ToString(); string GhiChu = e.NewValues["GhiChu"] == null ? "" : e.NewValues["GhiChu"].ToString(); data = new dtKhuVuc(); data.Sua(ID, GhiChu, TenKhuVuc, "0", IDChiNhanh, KyHieu, IDBangGia); e.Cancel = true; gridDanhSach.CancelEdit(); LoadGrid(); dtLichSuTruyCap.ThemLichSu(Session["IDChiNhanh"].ToString(), Session["IDNhom"].ToString(), Session["IDNhanVien"].ToString(), "Quản lý khu vực", "Cập nhật khu vực: " + ID); }
void detailGrid_RowUpdating(object sender, DevExpress.Web.Data.ASPxDataUpdatingEventArgs e) { ASPxGridView senderGridView = (ASPxGridView)sender; string query = "UPDATE [Products] SET [ProductName] = @ProductName, [UnitPrice] = @UnitPrice, [Discontinued] = @Discontinued WHERE [ProductID] = @ProductID"; SqlCommand cmd = new SqlCommand(query, DataHelper.GetConnection()); cmd.Parameters.Add("@ProductName", SqlDbType.NVarChar).Value = e.NewValues["ProductName"]; cmd.Parameters.Add("@UnitPrice", SqlDbType.Decimal).Value = e.NewValues["UnitPrice"]; cmd.Parameters.Add("@Discontinued", SqlDbType.Bit).Value = e.NewValues["Discontinued"]; cmd.Parameters.Add("@ProductID", SqlDbType.Int).Value = e.Keys[0]; cmd.Connection.Open(); cmd.ExecuteNonQuery(); e.Cancel = true; senderGridView.CancelEdit(); senderGridView.DataSource = GetDetailDataSource(); }
protected void dxgvSupplierList_RowUpdating(object sender, DevExpress.Web.Data.ASPxDataUpdatingEventArgs e) { try { DataRow[] dr = ((DataSet)Session["SearchSuppliers"]).Tables[0].Select("SupId=" + e.Keys[0].ToString()); if (dr.Length > 0) { decimal newValue; decimal oldValue; /// /// If old value was not numeric /// if (!Decimal.TryParse(e.OldValues["CreditAmmount"].ToString(), out oldValue)) { return; } if (Decimal.TryParse(e.NewValues["CreditAmmount"].ToString(), out newValue)) { dr[0]["CreditAmmount"] = e.NewValues["CreditAmmount"]; e.Cancel = true; dxgvSupplierList.CancelEdit(); dxgvSupplierList.DataBind(); } else { return; } } } catch (Exception ex) { ex.Data.Add("UILayerException", this.GetType().ToString() + Constant.Error_Seperator + "protected void dxgvSupplierList_RowUpdating(object sender, DevExpress.Web.Data.ASPxDataUpdatingEventArgs e)"); if (Master.LoggedUser != null && Master.LoggedUser.UserName != null && Master.LoggedUser.UserName != string.Empty) { Response.Redirect("Error.aspx?LogId=" + LankaTilesExceptions.WriteEventLogs(ex, Constant.Database_Connection_Name, Master.LoggedUser.UserName), false); } else { Response.Redirect("Error.aspx?LogId=" + LankaTilesExceptions.WriteEventLogs(ex, Constant.Database_Connection_Name, "Annonimous"), false); } } }
protected void GridPlaceView_RowUpdating(object sender, DevExpress.Web.Data.ASPxDataUpdatingEventArgs e) { var listSaP = (List <PlaceViewModel>)GridPlaceView.DataSource; PlaceViewModel model = listSaP.Find(m => m.Id == e.Keys[0].ToString()); model.PlaceId = e.NewValues["PlaceId"] == null ? 0 : (int)e.NewValues["PlaceId"]; model.RegionId = e.NewValues["RegionId"] == null ? 0 : (int)e.NewValues["RegionId"]; model.PlaceName = e.NewValues["PlaceName"].ToString() ?? string.Empty; model.ImageGalleryPath = e.NewValues["ImageGalleryPath"].ToString() ?? string.Empty; model.ImageThumbnailsPath = e.NewValues["ImageThumbnailsPath"].ToString() ?? string.Empty; controller.UpdatePlace(model); e.Cancel = true; GridPlaceView.CancelEdit(); Bind(); }
protected void dxGridUsuario_RowUpdating(object sender, DevExpress.Web.Data.ASPxDataUpdatingEventArgs e) { ServicioUsuario.ServiciosUsuarioClient sercivio_usuario = new ServicioUsuario.ServiciosUsuarioClient(); string id = e.NewValues["idUsuario"].ToString(); string usuario = e.NewValues["usuario_alias"].ToString(); string tipo_usuario = e.NewValues["tipo_usuario"].ToString(); string nombre = e.NewValues["nombre"].ToString(); string apellido = e.NewValues["apellido"].ToString(); string email = e.NewValues["email"].ToString(); string contrasena = e.NewValues["contrasena"].ToString(); string dpi = e.NewValues["DPI"].ToString(); string telefono = e.NewValues["telefono"].ToString(); string estado = e.NewValues["estado"].ToString(); sercivio_usuario.actualizarUsuario(int.Parse(id), usuario, nombre, apellido, email, contrasena, telefono, int.Parse(tipo_usuario), dpi, bool.Parse(estado)); CargaUsuario(); e.Cancel = true; }
protected void grd_DSUsers_RowUpdating(object sender, DevExpress.Web.Data.ASPxDataUpdatingEventArgs e) { try { e.Cancel = true; Int32 idUser = Convert.ToInt32(e.Keys[grd_DSUsers.KeyFieldName]); ASPxFormLayout pnLayData = grd_DSUsers.FindEditFormTemplateControl("LayOutThemSua") as ASPxFormLayout; User user = new User(); Utils.setView2ObjectLayout <User>(user, pnLayData); ctlUser.updateUsers(idUser, user); Bindata(); Utils.notifierGrid(grd_DSUsers, Constant.NOTIFY_SUCCESS, "Bạn đã cập nhập thành công tài khoản [" + user.Id_Login + "]"); } catch (Exception ex) { Utils.notifierGrid(grd_DSUsers, Constant.NOTIFY_FAILURE, ex.Message + " " + ex.StackTrace); } }
protected void grid_RowUpdating(object sender, DevExpress.Web.Data.ASPxDataUpdatingEventArgs e) { ASPxTextBox text = grid.FindEditFormTemplateControl("txtName") as ASPxTextBox; ASPxTextBox textId = grid.FindEditFormTemplateControl("txtId") as ASPxTextBox; this.blood = objBlood.GetBloodGroup(Int32.Parse(textId.Text)); if (this.blood != null) { this.blood.name = text.Text; this.objBlood.UpdateBloodGroup(blood); } grid.CancelEdit(); e.Cancel = true; grid.DataSource = objBlood.GetBloodGroups(); grid.DataBind(); }
protected void gv_RowUpdating(object sender, DevExpress.Web.Data.ASPxDataUpdatingEventArgs e) { BootstrapGridView gv = (BootstrapGridView)sender; MasterDataModel.MasterDataSPSH item = GetGvValue(gv, e.Keys[0].ToString()); string res = MasterDataEntity.EditMasterDataSPSH(item); gv.JSProperties["cpRes"] = res; e.Cancel = true; if (res.Contains("Success")) { gv.CancelEdit(); gv.DataBind(); } }
protected void grid_Inventory_RowUpdating(object sender, DevExpress.Web.Data.ASPxDataUpdatingEventArgs e) { ASPxGridView grid = (sender as ASPxGridView) as ASPxGridView; e.NewValues["Description"] = SafeValue.SafeString(e.NewValues["Description"]); e.NewValues["Qty"] = SafeValue.SafeInt(e.NewValues["Qty"], 0); e.NewValues["CreatedBy"] = EzshipHelper.GetUserName(); e.NewValues["CreateDateTime"] = DateTime.Now; e.NewValues["Remark"] = SafeValue.SafeString(e.NewValues["Remark"]); e.NewValues["DoType"] = SafeValue.SafeString(e.NewValues["DoType"]); e.NewValues["Unit"] = SafeValue.SafeString(e.NewValues["Unit"]); e.NewValues["Packing"] = SafeValue.SafeString(e.NewValues["Packing"]); e.NewValues["Weight"] = SafeValue.SafeDecimal(e.NewValues["Weight"]); e.NewValues["Volume"] = SafeValue.SafeDecimal(e.NewValues["Volume"]); e.NewValues["PalletNo"] = SafeValue.SafeString(e.NewValues["PalletNo"]); e.NewValues["Location"] = SafeValue.SafeString(e.NewValues["Location"]); e.NewValues["DoDate"] = SafeValue.SafeDate(e.NewValues["DoDate"], DateTime.Now); }
protected void ASPxGridView1_RowUpdating(object sender, DevExpress.Web.Data.ASPxDataUpdatingEventArgs e) { ASPxTextBox txtXLH = ASPxGridView1.FindEditFormTemplateControl("txtXLH") as ASPxTextBox; ASPxTextBox txtJYY = ASPxGridView1.FindEditFormTemplateControl("txtJYY") as ASPxTextBox; ASPxTextBox txtROWID = ASPxGridView1.FindEditFormTemplateControl("txtROWID") as ASPxTextBox; try { string Sql2 = "UPDATE ATPUHGZ T SET T.XLH='" + txtXLH.Text.Trim() + "' , T.JYY='" + txtJYY.Text.Trim() + "' WHERE T.ROWID='" + txtROWID.Text.Trim() + "'"; dc.ExeSql(Sql2); } catch { } e.Cancel = true; ASPxGridView1.CancelEdit(); setCondition(); }
protected void grid_contact_RowUpdating(object sender, DevExpress.Web.Data.ASPxDataUpdatingEventArgs e) { ASPxPageControl pageControl = this.grid.FindEditFormTemplateControl("pageControl") as ASPxPageControl; ASPxTextBox txtPartyId = pageControl.FindControl("txtPartyId") as ASPxTextBox; ASPxTextBox txtName = pageControl.FindControl("txtName") as ASPxTextBox; e.NewValues["PartyId"] = txtPartyId.Text; e.NewValues["PartyName"] = txtName.Text; e.NewValues["IsDefault"] = SafeValue.SafeBool(e.NewValues["IsDefault"], true); e.NewValues["Name"] = SafeValue.SafeString(e.NewValues["Name"]); e.NewValues["Tel"] = SafeValue.SafeString(e.NewValues["Tel"]); e.NewValues["Fax"] = SafeValue.SafeString(e.NewValues["Fax"]); e.NewValues["Address"] = SafeValue.SafeString(e.NewValues["Address"]); e.NewValues["Email"] = SafeValue.SafeString(e.NewValues["Email"]); e.NewValues["Mobile"] = SafeValue.SafeString(e.NewValues["Mobile"]); e.NewValues["Remark"] = SafeValue.SafeString(e.NewValues["Remark"]); e.NewValues["Department"] = SafeValue.SafeString(e.NewValues["Department"]); }
protected void grid_RowUpdating(object sender, DevExpress.Web.Data.ASPxDataUpdatingEventArgs e) { ASPxTextBox text = grid.FindEditFormTemplateControl("txtName") as ASPxTextBox; ASPxTextBox textId = grid.FindEditFormTemplateControl("txtId") as ASPxTextBox; this.nationality = objNationality.GetNationality(Int32.Parse(textId.Text)); if (this.nationality != null) { this.nationality.name = text.Text; this.objNationality.UpdateNationality(nationality); } grid.CancelEdit(); e.Cancel = true; this.grid.DataSource = objNationality.GetNationalities(); this.grid.DataBind(); }
//修改 protected void ASPxGridView1_RowUpdating(object sender, DevExpress.Web.Data.ASPxDataUpdatingEventArgs e) { MS_MODIFY_OVER_MAT sp = new MS_MODIFY_OVER_MAT() { FUNC1 = "UPDATE", MATERIALCODE1 = e.NewValues["MATERIAL_CODE"].ToString(), LINESIDENUM1 = e.NewValues["MATERIAL_NUM"].ToString(), GZDD1 = e.NewValues["GZDD"].ToString(), YHDM1 = theUserCode, QADSITE1 = e.NewValues["QADSITE"].ToString() }; Rmes.DA.Base.Procedure.run(sp); setCondition(); e.Cancel = true; ASPxGridView1.CancelEdit(); }
protected void gridChiNhanh_RowUpdating(object sender, DevExpress.Web.Data.ASPxDataUpdatingEventArgs e) { string ID = e.Keys[0].ToString(); string MaChiNhanh = e.NewValues["MaChiNhanh"].ToString(); string TenChiNhanh = e.NewValues["TenChiNhanh"].ToString(); string DienThoai = e.NewValues["DienThoai"] == null ? "" : e.NewValues["DienThoai"].ToString(); string DiaChi = e.NewValues["DiaChi"] == null ? "" : e.NewValues["DiaChi"].ToString(); DateTime NgayMo = DateTime.Parse(e.NewValues["NgayMo"].ToString()); string DuLieuMau = e.NewValues["DuLieuMau"] == null ? "0" : "1"; string Email = e.NewValues["Email"] == null ? "" : e.NewValues["Email"].ToString(); data = new dtChiNhanh(); data.SuaChiNhanh(ID, MaChiNhanh, TenChiNhanh, DienThoai, DiaChi, NgayMo, Email, DuLieuMau); e.Cancel = true; gridChiNhanh.CancelEdit(); LoadGrid(); dtLichSuTruyCap.ThemLichSu(Session["IDChiNhanh"].ToString(), Session["IDNhom"].ToString(), Session["IDNhanVien"].ToString(), "Chi nhánh", "Cập nhật chi nhánh: " + ID); }
protected void gv_RowUpdating(object sender, DevExpress.Web.Data.ASPxDataUpdatingEventArgs e) { ASPxTextBox txt_Id = gv.FindEditRowCellTemplateControl(null, "txt_Id") as ASPxTextBox; string driverCode = SafeValue.SafeString(e.NewValues["DriverCode"]); string stage = SafeValue.SafeString(e.NewValues["StageCode"]); string date = SafeValue.SafeString(e.NewValues["FromDate"]); string remark = SafeValue.SafeString(e.NewValues["Remark"]); string status = SafeValue.SafeString(e.NewValues["StageStatus"]); string time = SafeValue.SafeString(e.NewValues["FromTime"]); string load = SafeValue.SafeString(e.NewValues["LoadCode"], " "); string Id = txt_Id.Text; string sql = string.Format(@"update CTM_JobDet2 set StageCode='{0}',FromDate='{1}',Remark='{2}',StageStatus='{3}',FromTime='{4}',LoadCode='{6}' where Id='{5}'", stage, date, remark, status, time, Id, load); ConnectSql.ExecuteSql(sql); e.Cancel = true; search_data(); this.gv.StartEdit(-1); }
protected void ASPxGridView1_RowUpdating(object sender, DevExpress.Web.Data.ASPxDataUpdatingEventArgs e) { //修改 ASPxTextBox uCode = ASPxGridView1.FindEditFormTemplateControl("txtClassCode") as ASPxTextBox; ASPxTextBox uName = ASPxGridView1.FindEditFormTemplateControl("txtClassName") as ASPxTextBox; string tc = uCode.Text.ToString().Trim(); string tn = uName.Text.ToString().Trim(); string Sql = "UPDATE CODE_ASSET_CLASS SET ASSET_CLASS_NAME='" + tn + "'" + " WHERE COMPANY_CODE = '" + theCompanyCode + "' and ASSET_CLASS_CODE = '" + tc + "'"; dc.ExeSql(Sql); e.Cancel = true; ASPxGridView1.CancelEdit(); setCondition(); }
protected void ASPxGridView1_RowUpdating(object sender, DevExpress.Web.Data.ASPxDataUpdatingEventArgs e) { ASPxTextBox uCode = ASPxGridView1.FindEditFormTemplateControl("txtPlineCode") as ASPxTextBox; ASPxTextBox uName = ASPxGridView1.FindEditFormTemplateControl("txtPlineName") as ASPxTextBox; ASPxComboBox uTcode = ASPxGridView1.FindEditFormTemplateControl("dropPlineType") as ASPxComboBox; ASPxTextBox uScode = ASPxGridView1.FindEditFormTemplateControl("txtSapCode") as ASPxTextBox; ASPxComboBox uSflag = ASPxGridView1.FindEditFormTemplateControl("ASPxComboBox2") as ASPxComboBox; ASPxComboBox uTflag = ASPxGridView1.FindEditFormTemplateControl("ASPxComboBox1") as ASPxComboBox; string Sql = "UPDATE CODE_PRODUCT_LINE SET PLINE_NAME='" + uName.Text.Trim() + "', PLINE_TYPE_CODE='" + uTcode.Value.ToString() + "',THIRD_FLAG='" + uTflag.Value.ToString() + "',STOCK_FLAG='" + uSflag.Value.ToString() + "',SAP_CODE='" + uScode.Text.Trim() + "'" + " WHERE COMPANY_CODE = '" + theCompanyCode + "' and PLINE_CODE = '" + uCode.Text.Trim() + "'"; dc.ExeSql(Sql); e.Cancel = true; ASPxGridView1.CancelEdit(); setCondition(); }
protected void EmployeesGrid_RowUpdating(object sender, DevExpress.Web.Data.ASPxDataUpdatingEventArgs e) { ASPxGridView grid = (ASPxGridView)sender; string id = grid.GetRowValues(grid.EditingRowVisibleIndex, "ID").ToString(); string UrunKodu = e.NewValues["UrunKodu"] == null ? "" : e.NewValues["UrunKodu"].ToString(); string resimadi = DataProvider.urunresmi; string UrunAdi = e.NewValues["UrunAdi"] == null ? "" : e.NewValues["UrunAdi"].ToString(); string KategoriID_TipID4 = e.NewValues["KategoriID_TipID4"] == null ? "" : e.NewValues["KategoriID_TipID4"].ToString(); string Marka = e.NewValues["Marka"] == null ? "" : e.NewValues["Marka"].ToString(); string Model = e.NewValues["Model"] == null ? "" : e.NewValues["Model"].ToString(); string Fiyat = e.NewValues["Fiyat"] == null ? "" : e.NewValues["Fiyat"].ToString(); db.U_UrunTanimlari(Convert.ToInt32(id), UrunKodu, UrunAdi, Convert.ToInt32(KategoriID_TipID4), Marka, Model, Convert.ToDecimal(Fiyat), resimadi); e.Cancel = true; EmployeesGrid.CancelEdit(); Update(); }
protected void ASPxGridView1_RowUpdating(object sender, DevExpress.Web.Data.ASPxDataUpdatingEventArgs e) { ASPxGridView grd = sender as ASPxGridView; ASPxTextBox pwd = grd.FindEditFormTemplateControl("txtPwd") as ASPxTextBox; if (pwd.Text == "") { //e.Cancel = true; //throw new Exception("Please enter the password ."); } else { ASPxTextBox userId = grd.FindEditFormTemplateControl("txtCode") as ASPxTextBox; Encryption.EncryptClass encrypt = new Encryption.EncryptClass(); e.NewValues["Pwd"] = encrypt.DESEnCode(userId.Text, pwd.Text); } }
protected void ASPxGridView1_RowUpdating(object sender, DevExpress.Web.Data.ASPxDataUpdatingEventArgs e) { //修改记录 string rmes_id = e.OldValues["RMES_ID"].ToString(); DepartmentEntity detEntity = DepartmentFactory.GetByKey(rmes_id); detEntity.DEPT_NAME = e.NewValues["DEPT_NAME"].ToString().Trim(); detEntity.PARENT_DEPT = e.NewValues["PARENT_DEPT"].ToString().Trim(); detEntity.DEPT_REMARK = e.NewValues["DEPT_REMARK"].ToString().Trim(); db.Update(detEntity); e.Cancel = true; ASPxGridView1.CancelEdit(); setCondition(); }
protected void grdBooking_RowUpdating(object sender, DevExpress.Web.Data.ASPxDataUpdatingEventArgs e) { CriteriaOperator filter = new BinaryOperator("SalesInvoiceId", Guid.Parse(Session["SaleBillId"].ToString()), BinaryOperatorType.Equal); XPCollection <SaleInvoiceTransaction> saleInvoiceTransaction = new XPCollection <SaleInvoiceTransaction>(session, filter); if (saleInvoiceTransaction.Count > 0) { foreach (SaleInvoiceTransaction item in saleInvoiceTransaction) { if (item.RowStatus == ROW_NOT_DELETE) { grdBooking.CancelEdit(); return; } } } grdBooking.DetailRows.ExpandRow(grdBooking.FocusedRowIndex); }
public void ASPxGridView1_RowUpdating(object sender, DevExpress.Web.Data.ASPxDataUpdatingEventArgs e) { if (ASPxGridView1.IsEditing) { string id = e.OldValues["RMES_ID"].ToString(); LineSideStoreEntity entity = db.First <LineSideStoreEntity>("where rmes_id=@0", id); entity.PLINE_CODE = e.NewValues["PLINE_CODE"].ToString(); entity.WORKUNIT_CODE = e.NewValues["WORKUNIT_CODE"].ToString(); entity.WORKSHOP_CODE = e.NewValues["WORKSHOP_CODE"].ToString(); entity.STORE_CODE = e.NewValues["STORE_CODE"].ToString(); entity.STORE_NAME = e.NewValues["STORE_NAME"].ToString(); entity.STORE_TYPE = e.NewValues["STORE_TYPE"].ToString(); db.Update(entity); e.Cancel = true; ASPxGridView1.CancelEdit(); BindData(); } }
//修改 protected void ASPxGridView1_RowUpdating(object sender, DevExpress.Web.Data.ASPxDataUpdatingEventArgs e) { ASPxTextBox m_rowID = ASPxGridView1.FindEditFormTemplateControl("ROWID") as ASPxTextBox; ASPxTextBox m_Ghtm = ASPxGridView1.FindEditFormTemplateControl("GHTM") as ASPxTextBox; ASPxTextBox m_RkDate = ASPxGridView1.FindEditFormTemplateControl("RKDATE") as ASPxTextBox; ASPxTextBox m_SO = ASPxGridView1.FindEditFormTemplateControl("txtSO") as ASPxTextBox; ASPxComboBox m_Rklx = ASPxGridView1.FindEditFormTemplateControl("txtRklx") as ASPxComboBox; string sql = "update dp_pktemp set rklx='" + m_Rklx.Text.Trim() + "',SO = '" + m_SO.Text.Trim() //判断哪一行直接用ROWID最方便 + "' where ROWID = '" + m_rowID.Text.ToString() + "' "; dc.ExeSql(sql); e.Cancel = true; ASPxGridView1.CancelEdit(); setCondition(); }
protected void grid_RowUpdating(object sender, DevExpress.Web.Data.ASPxDataUpdatingEventArgs e) { ASPxTextBox text = grid.FindEditFormTemplateControl("txtName") as ASPxTextBox; this.khanang = obj.GetKhaNang(Int32.Parse(e.Keys[grid.KeyFieldName].ToString())); this.khanang.KhaNang = text.Text; this.obj.CapNhatKhaNang(this.khanang); grid.CancelEdit(); e.Cancel = true; grid.DataSource = obj.GetKhaNangs(); grid.DataBind(); }
protected void ASPxGridView1_RowUpdating(object sender, DevExpress.Web.Data.ASPxDataUpdatingEventArgs e) { //修改记录 string strCode = e.OldValues["STATION_CODE_SUB"].ToString(); StationSubEntity entSub = StationSubFactory.GetByKey(strCode); entSub.PLINE_CODE = e.NewValues["PLINE_CODE"].ToString(); entSub.STATION_CODE = e.NewValues["STATION_CODE"].ToString(); entSub.STATION_CODE_SUB = e.NewValues["STATION_CODE_SUB"].ToString(); entSub.STATION_NAME_SUB = e.NewValues["STATION_NAME_SUB"].ToString(); db.Update(entSub); e.Cancel = true; ASPxGridView1.CancelEdit(); setCondition(); }
protected void gvCourse_RowUpdating(object sender, DevExpress.Web.Data.ASPxDataUpdatingEventArgs e) { ASPxComboBox facultyCbx = gvCourse.FindEditFormTemplateControl("facultyCbx") as ASPxComboBox; ASPxComboBox CouTypeCbx = gvCourse.FindEditFormTemplateControl("CouTypeCbx") as ASPxComboBox; TextBox txtOpenCourse = gvCourse.FindEditFormTemplateControl("txtOpenCourse") as TextBox; string txtCourseOpen = Convert.ToString(txtOpenCourse.Text); string facultyNo = Convert.ToString(facultyCbx.Value); string facultyName = Convert.ToString(facultyCbx.Text); string CouTypeNo = Convert.ToString(CouTypeCbx.Value); string CouTypeName = Convert.ToString(CouTypeCbx.Text); e.NewValues["开课时间"] = txtCourseOpen; e.NewValues["课程封面"] = PublicValue.relativePath; e.NewValues["学院号"] = facultyNo; e.NewValues["课程类型代码"] = CouTypeNo; e.NewValues["学院"] = facultyName; e.NewValues["课程类型"] = CouTypeName; }
protected void grd_DSRole_RowUpdating(object sender, DevExpress.Web.Data.ASPxDataUpdatingEventArgs e) { try { e.Cancel = true; Int32 idRoles = Convert.ToInt32(e.Keys[grd_DSRole.KeyFieldName]); ASPxFormLayout pnLayData = grd_DSRole.FindEditFormTemplateControl("LayOutThemSua") as ASPxFormLayout; ASPxMemo txtNote = pnLayData.FindControl("txtNote") as ASPxMemo; ASPxTextBox txtName = pnLayData.FindControl("txtName") as ASPxTextBox; ctlRole.updateRoles(idRoles, txtName.Text, txtNote.Text); BindataThemNhanh(); Utils.notifierGrid(grd_DSRole, Constant.NOTIFY_SUCCESS, "Bạn đã cập nhập thành công cho Role có ID [" + idRoles.ToString() + "]"); } catch (Exception ex) { Utils.notifierGrid(grd_DSRole, Constant.NOTIFY_FAILURE, ex.Message + " " + ex.StackTrace); } }
protected void grid_RowUpdating(object sender, DevExpress.Web.Data.ASPxDataUpdatingEventArgs e) { ASPxTextBox text = grid.FindEditFormTemplateControl("txtName") as ASPxTextBox; ASPxTextBox txtMaNhom = grid.FindEditFormTemplateControl("txtMaNhom") as ASPxTextBox; this.nhomchuyennganh = obj.GetNhomChuyenNganh(Int32.Parse(e.Keys[grid.KeyFieldName].ToString())); this.nhomchuyennganh.MaNhom = txtMaNhom.Text; this.nhomchuyennganh.NhomChuyenNganh = text.Text; this.obj.CapNhatNhomChuyenNganh(this.nhomchuyennganh); grid.CancelEdit(); e.Cancel = true; grid.DataSource = obj.GetNhomChuyenNganhs(); grid.DataBind(); }
protected void grid_RowUpdating(object sender, DevExpress.Web.Data.ASPxDataUpdatingEventArgs e) { ASPxGridView grid = sender as ASPxGridView; DataTable table = new DataTable(); table = GetTable(); DataRow found = table.Rows.Find(e.Keys[0]); found["KPI"] = e.NewValues["KPI"]; found["Rate"] = e.NewValues["Rate"]; Session["Table101"] = table; grid.DataSource = table; grid.DataBind(); e.Cancel = true; grid.CancelEdit(); }
protected void DiskGridView_RowUpdating(object sender, DevExpress.Web.Data.ASPxDataUpdatingEventArgs e) { ASPxGridView gridView = (ASPxGridView)sender; DataTable DiskDataTable = (DataTable)Session["DiskDataTable"]; DataRow dr = GetDiskRow(DiskDataTable, e.NewValues.GetEnumerator(), e.Keys[0].ToString());//Convert.ToInt32(e.Keys[0])); //gridView.UpdateEdit(); Session["DiskDataTable"] = DiskDataTable; FillDiskGridfromSession(); gridView.CancelEdit(); e.Cancel = true; }