public static void DeleteCard(object sender, DevExpress.Web.Data.ASPxDataDeletingEventArgs e) { DeleteRow((int)e.Keys[0]); BindCardView(sender as ASPxCardView); e.Cancel = true; }
protected void grid_InvDet_RowDeleting(object sender, DevExpress.Web.Data.ASPxDataDeletingEventArgs e) { e.Values["SequenceId"] = SafeValue.SafeString(e.Values["SequenceId"]); }
protected void grid_RowDeleting(object sender, DevExpress.Web.Data.ASPxDataDeletingEventArgs e) { throw new NotSupportedException("Operation is disallowed in a demo"); }
protected void Grid_RowDeleting(object sender, DevExpress.Web.Data.ASPxDataDeletingEventArgs e) { // Database editing is not allowed in online examples e.Cancel = true; }
protected void grdData_RowDeleting(object sender, DevExpress.Web.Data.ASPxDataDeletingEventArgs e) { e.Cancel = true; }
protected void gvEditpermissions_RowDeleting(object sender, DevExpress.Web.Data.ASPxDataDeletingEventArgs e) { }
protected void GridListagem_RowDeleting(object sender, DevExpress.Web.Data.ASPxDataDeletingEventArgs e) { // }
protected void ASPxCardView1_CardDeleting(object sender, DevExpress.Web.Data.ASPxDataDeletingEventArgs e) { DeleteItem(e.Keys, e.Values); CancelEditing(e); }
protected void GridListagem_RowDeleting(object sender, DevExpress.Web.Data.ASPxDataDeletingEventArgs e) { ASPxGridView gridView = (ASPxGridView)sender; uContasReceber.Exclui(e.Values["ID"].ToString()); // gridView.CancelEdit(); e.Cancel = true; //Usando Classe uLog.MakeLog - Gravando Log fwObs_Log = "EXCLUI CONTAS A RECEBER: " + e.Values["ID"].ToString() + "/" + e.Values["lancamento"].ToString().ToUpper(); SqlParameter[] param_log = { new SqlParameter("@login", (String)Session["CodUsuario"]), new SqlParameter("@tabela", fWtabela), new SqlParameter("@operacao", "CONTAS A RECEBER"), new SqlParameter("@obs", "EXCLUI"), new SqlParameter("@acao", fwObs_Log) }; uLog.MakeLog(param_log); //Todas if (rbparcelasituacao.SelectedIndex == 0) { //Todas/Lançamento if (rbordenacao.SelectedIndex == 0) { GridListagem.Visible = true; AtualizaGrid("T", "L"); } //Todas/Classe Despesa if (rbordenacao.SelectedIndex == 1) { GridListagem.Visible = true; AtualizaGrid("T", "D"); } //Todas/Fornecedores if (rbordenacao.SelectedIndex == 2) { GridListagem.Visible = true; AtualizaGrid("T", "F"); } //Todas/Data Prevista if (rbordenacao.SelectedIndex == 3) { GridListagem.Visible = true; AtualizaGrid("T", "DP"); } //Todas/Data Realizado if (rbordenacao.SelectedIndex == 4) { GridListagem.Visible = true; AtualizaGrid("T", "DR"); } //Todas/Data Nota Fiscal if (rbordenacao.SelectedIndex == 5) { GridListagem.Visible = true; AtualizaGrid("T", "DN"); } } //Previsto if (rbparcelasituacao.SelectedIndex == 1) { //Previsto/Lançamento if (rbordenacao.SelectedIndex == 0) { GridListagem.Visible = true; AtualizaGrid("P", "L"); } //Previsto/Classe Despesa if (rbordenacao.SelectedIndex == 1) { GridListagem.Visible = true; AtualizaGrid("P", "D"); } //Previsto/Fornecedores if (rbordenacao.SelectedIndex == 2) { GridListagem.Visible = true; AtualizaGrid("P", "F"); } //Previsto/Data Prevista if (rbordenacao.SelectedIndex == 3) { GridListagem.Visible = true; AtualizaGrid("P", "DP"); } //Previsto/Data Realizado if (rbordenacao.SelectedIndex == 4) { GridListagem.Visible = true; AtualizaGrid("P", "DR"); } //Previsto/Data Nota Fiscal if (rbordenacao.SelectedIndex == 5) { GridListagem.Visible = true; AtualizaGrid("P", "DN"); } } //Realizado if (rbparcelasituacao.SelectedIndex == 2) { //Realizado/Lançamento if (rbordenacao.SelectedIndex == 0) { GridListagem.Visible = true; AtualizaGrid("R", "L"); } //Realizado/Classe Despesa if (rbordenacao.SelectedIndex == 1) { GridListagem.Visible = true; AtualizaGrid("R", "D"); } //Realizado/Fornecedores if (rbordenacao.SelectedIndex == 2) { GridListagem.Visible = true; AtualizaGrid("R", "F"); } //Realizado/Data Prevista if (rbordenacao.SelectedIndex == 3) { GridListagem.Visible = true; AtualizaGrid("R", "DP"); } //Realizado/Data Realizado if (rbordenacao.SelectedIndex == 4) { GridListagem.Visible = true; AtualizaGrid("R", "DR"); } //Realizado/Data Nota Fiscal if (rbordenacao.SelectedIndex == 5) { GridListagem.Visible = true; AtualizaGrid("R", "DN"); } } }
protected void gvStudents_RowDeleting(object sender, DevExpress.Web.Data.ASPxDataDeletingEventArgs e) { Session["fromwhere"] = "~/feespayment.aspx"; Session["report"] = new mySmis.reports.rptProgramsLevels(); Response.Redirect("~/documentviewer.aspx"); }
protected void POAddEditGrid_RowDeleting(object sender, DevExpress.Web.Data.ASPxDataDeletingEventArgs e) { string PK = e.Keys[0].ToString(); SqlConnection conn = new SqlConnection(GlobalClass.SQLConnString()); conn.Open(); SqlCommand cmd = null; string ItemPK = "", Identifier = "", qty = ""; string query = "SELECT ItemPK, Identifier, Qty FROM [dbo].[tbl_POCreation_Details] WHERE [PK] = '" + PK + "'"; cmd = new SqlCommand(query, conn); SqlDataReader reader = cmd.ExecuteReader(); while (reader.Read()) { ItemPK = reader["ItemPK"].ToString(); Identifier = reader["Identifier"].ToString(); qty = reader["Qty"].ToString(); } reader.Close(); string delete = "DELETE FROM [dbo].[tbl_POCreation_Details] WHERE [PK] = '" + PK + "'"; cmd = new SqlCommand(delete, conn); cmd.ExecuteNonQuery(); string update = ""; Double original_qty_po = 0, remaining = 0; switch (Identifier) { case "1": //DM query = "SELECT [QtyPO] FROM [dbo].[tbl_MRP_List_DirectMaterials] WHERE [PK] = '" + ItemPK + "'"; cmd = new SqlCommand(query, conn); reader = cmd.ExecuteReader(); while (reader.Read()) { original_qty_po = Convert.ToDouble(reader["QtyPO"].ToString()); } reader.Close(); remaining = original_qty_po - Convert.ToDouble(qty); MRPClass.PrintString(remaining.ToString()); MRPClass.PrintString(original_qty_po.ToString()); MRPClass.PrintString(qty.ToString()); update = "UPDATE [dbo].[tbl_MRP_List_DirectMaterials] SET [QtyPO] = '" + remaining + "' WHERE [PK] = '" + ItemPK + "'"; cmd = new SqlCommand(update, conn); cmd.ExecuteNonQuery(); break; case "2": //OP query = "SELECT [QtyPO] FROM [dbo].[tbl_MRP_List_OPEX] WHERE [PK] = '" + ItemPK + "'"; cmd = new SqlCommand(query, conn); reader = cmd.ExecuteReader(); while (reader.Read()) { original_qty_po = Convert.ToDouble(reader["QtyPO"].ToString()); } reader.Close(); remaining = original_qty_po - Convert.ToDouble(qty); update = "UPDATE [dbo].[tbl_MRP_List_OPEX] SET [QtyPO] = '" + remaining + "' WHERE [PK] = '" + ItemPK + "'"; cmd = new SqlCommand(update, conn); cmd.ExecuteNonQuery(); break; case "4": //CAPEX query = "SELECT [QtyPO] FROM [dbo].[tbl_MRP_List_CAPEX] WHERE [PK] = '" + ItemPK + "'"; cmd = new SqlCommand(query, conn); reader = cmd.ExecuteReader(); while (reader.Read()) { original_qty_po = Convert.ToDouble(reader["QtyPO"].ToString()); } reader.Close(); remaining = original_qty_po - Convert.ToDouble(qty); update = "UPDATE [dbo].[tbl_MRP_List_CAPEX] SET [QtyPO] = '" + remaining + "' WHERE [PK] = '" + ItemPK + "'"; cmd = new SqlCommand(update, conn); cmd.ExecuteNonQuery(); break; } conn.Close(); e.Cancel = true; BindGrid(); }
protected void QualificationsInfoGridView_RowDeleting(object sender, DevExpress.Web.Data.ASPxDataDeletingEventArgs e) { }
/// <summary> /// 删除之前检查该类型是否被使用 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void GV_SmallType_RowDeleting(object sender, DevExpress.Web.Data.ASPxDataDeletingEventArgs e) { }
protected void ASPxTreeList1_NodeDeleting(object sender, DevExpress.Web.Data.ASPxDataDeletingEventArgs e) { throw new Exception("Data modifications are not allowed in the online example."); }
protected void ASPxGridView1_RowDeleting(object sender, DevExpress.Web.Data.ASPxDataDeletingEventArgs e) { string strCode = e.Values["RMES_ID"].ToString(); string strID = e.Values["USER_ID"].ToString(); string strTableName = "REL_USER_PLINE"; dataConn theDataConn = new dataConn("select func_check_delete_data('" + strTableName + "','" + theCompanyCode + "','MES','MES','MES','" + strCode + "') from dual"); theDataConn.OpenConn(); string theRet = theDataConn.GetValue(); if (theRet != "Y") { ASPxGridView1.JSProperties.Add("cpCallbackName", "Delete"); ASPxGridView1.JSProperties.Add("cpCallbackRet", theRet); theDataConn.CloseConn(); } else { //确认删除 string Sql = "delete from REL_USER_PLINE WHERE COMPANY_CODE = '" + theCompanyCode + "' and USER_ID = '" + strID + "'and RMES_ID = '" + strCode + "'"; dc.ExeSql(Sql); } setCondition(); e.Cancel = true; ////删除 ////调用存储过程进行处理 //userManager theUserManager = (userManager)Session["theUserManager"]; //MW_MODIFY_USER_PLINE sp = new MW_MODIFY_USER_PLINE() { // THEFUNCTION1 = "DELETE", // THECOMPANYCODE1 = theCompanyCode, // THEUSERID1 = e.Values["USER_ID"].ToString(), // THEPLINECODE1 = e.Values["PLINE_CODE"].ToString() //}; //Procedure.run(sp); //dataConn theDataConn = new dataConn(); //theDataConn.theComd.CommandType = CommandType.StoredProcedure; //theDataConn.theComd.CommandText = "MW_MODIFY_USER_PLINE"; //theDataConn.theComd.Parameters.Add("THEFUNCTION1", OracleDbType.Varchar2).Value = "DELETE"; //theDataConn.theComd.Parameters.Add("THEFUNCTION1", OracleDbType.Varchar2).Direction = ParameterDirection.Input; //theDataConn.theComd.Parameters.Add("THECOMPANYCODE1", OracleDbType.Varchar2).Value = theCompanyCode; //theDataConn.theComd.Parameters.Add("THECOMPANYCODE1", OracleDbType.Varchar2).Direction = ParameterDirection.Input; //theDataConn.theComd.Parameters.Add("THEUSERID1", OracleDbType.Varchar2).Value = e.Keys["USER_ID"].ToString(); //theDataConn.theComd.Parameters.Add("THEUSERID1", OracleDbType.Varchar2).Direction = ParameterDirection.Input; //theDataConn.theComd.Parameters.Add("THEPLINECODE1", OracleDbType.Varchar2).Value = e.Keys["PLINE_CODE"].ToString(); //theDataConn.theComd.Parameters.Add("THEPLINECODE1", OracleDbType.Varchar2).Direction = ParameterDirection.Input; //theDataConn.OpenConn(); //theDataConn.theComd.ExecuteNonQuery(); //theDataConn.CloseConn(); setCondition(); e.Cancel = true; }
protected void gridImportPro_RowDeleting(object sender, DevExpress.Web.Data.ASPxDataDeletingEventArgs e) { LamMoi(); ChiTietBangGia(); }
protected void grdDVT_RowDeleting(object sender, DevExpress.Web.Data.ASPxDataDeletingEventArgs e) { }
//删除 protected void ASPxGridView1_RowDeleting(object sender, DevExpress.Web.Data.ASPxDataDeletingEventArgs e) { //判断当前记录是否可以删除 string strLSeq = e.Values["LOCATION_SEQ"].ToString(); string strLCode = e.Values["LOCATION_CODE"].ToString(); string strPCode = e.Values["GZDD"].ToString(); string strTableName = "MS_LOCATION_TIME"; dataConn theDataConn = new dataConn("select func_check_delete_data('" + strTableName + "','" + theCompanyCode + "','MES','MES','MES','" + strLCode + "') from dual"); theDataConn.OpenConn(); string theRet = theDataConn.GetValue(); if (theRet != "Y") { ASPxGridView1.JSProperties.Add("cpCallbackName", "Delete"); ASPxGridView1.JSProperties.Add("cpCallbackRet", theRet); theDataConn.CloseConn(); } else { //插入到日志表delete try { string Sql2 = "INSERT INTO MS_LOCATION_TIME_LOG (LOCATION_SEQ,LOCATION_CODE,LOCATION_TIME,GZDD,user_code,flag,rqsj)" + " SELECT LOCATION_SEQ,LOCATION_CODE,LOCATION_TIME,GZDD,'" + theUserCode + "' , 'DEL', SYSDATE FROM MS_LOCATION_TIME WHERE LOCATION_CODE = '" + strLCode + "' AND GZDD='" + strPCode + "' "; dc.ExeSql(Sql2); } catch { return; } //确认删除 string Sql = "delete from MS_LOCATION_TIME WHERE LOCATION_CODE = '" + strLCode + "' AND GZDD='" + strPCode + "' "; dc.ExeSql(Sql); //插入到日志表update try { string Sql2 = "INSERT INTO MS_LOCATION_TIME_LOG (LOCATION_SEQ,LOCATION_CODE,LOCATION_TIME,GZDD,user_code,flag,rqsj)" + " SELECT LOCATION_SEQ,LOCATION_CODE,LOCATION_TIME,GZDD,'" + theUserCode + "' , 'BEFOREEDIT', SYSDATE FROM MS_LOCATION_TIME WHERE LOCATION_SEQ >= '" + strLSeq + "' AND GZDD='" + strPCode + "' "; dc.ExeSql(Sql2); } catch { return; } string UpSql = "UPDATE MS_LOCATION_TIME SET LOCATION_SEQ = LOCATION_SEQ-1 WHERE LOCATION_SEQ >= '" + strLSeq + "' AND GZDD = '" + strPCode + "' "; dc.ExeSql(UpSql); //插入到日志表update try { string Sql2 = "INSERT INTO MS_LOCATION_TIME_LOG (LOCATION_SEQ,LOCATION_CODE,LOCATION_TIME,GZDD,user_code,flag,rqsj)" + " SELECT LOCATION_SEQ,LOCATION_CODE,LOCATION_TIME,GZDD,'" + theUserCode + "' , 'AFTEREDIT', SYSDATE FROM MS_LOCATION_TIME WHERE LOCATION_SEQ >= '" + strLSeq + "' AND GZDD='" + strPCode + "' "; dc.ExeSql(Sql2); } catch { return; } } setCondition(); e.Cancel = true; }
protected void gridAttached_RowDeleting(object sender, DevExpress.Web.Data.ASPxDataDeletingEventArgs e) { rc_services.DeleteAttachment(Guid.Parse(e.Keys[0].ToString())); e.Cancel = true; BindGrid(); }
protected void gridNhaphang_RowDeleting(object sender, DevExpress.Web.Data.ASPxDataDeletingEventArgs e) { int IDNhapKho = Convert.ToInt32(e.Keys[0].ToString()); using (var scope = new TransactionScope()) { try { var NhapKho = DBDataProvider.DB.kNhapKhos.Where(x => x.IDNhapKho == IDNhapKho).FirstOrDefault(); if (NhapKho != null) { if (NhapKho.TrangThaiPhieu == 0) { NhapKho.TrangThaiPhieu = 2; khKhachHang kh = DBDataProvider.DB.khKhachHangs.Where(x => x.IDKhachHang == NhapKho.NCCID).FirstOrDefault(); if (NhapKho.CongNo > 0) // cập nhật công nợ + ghi nhật ký { #region ghi nhật ký nhập kho để xem báo cáo khNhatKyCongNo nhatky = new khNhatKyCongNo(); nhatky.NgayNhap = DateTime.Now; nhatky.DienGiai = "Xóa phiếu nhập kho"; nhatky.NoDau = kh.CongNo; nhatky.NhapHang = 0; nhatky.TraHang = NhapKho.CongNo; nhatky.NoCuoi = kh.CongNo - NhapKho.CongNo; nhatky.ThanhToan = 0; nhatky.NhanVienID = Formats.IDUser(); nhatky.SoPhieu = NhapKho.MaPhieu; nhatky.IDKhachHang = NhapKho.NCCID; DBDataProvider.DB.khNhatKyCongNos.InsertOnSubmit(nhatky); DBDataProvider.DB.SubmitChanges(); #endregion kh.TongTienHang -= NhapKho.TongTien; kh.CongNo -= NhapKho.CongNo; kh.LanCuoiMuaHang = DateTime.Now; } else { kh.TongTienHang -= NhapKho.TongTien; kh.CongNo -= NhapKho.CongNo; kh.LanCuoiMuaHang = DateTime.Now; } List <kNhapKhoChiTiet> nhapkho = DBDataProvider.NhapKhoChiTiet(IDNhapKho); foreach (var nk in nhapkho) { int IDHangHoa = Convert.ToInt32(nk.HangHoaID); int SoLuong = Convert.ToInt32(nk.SoLuong); var HangHoa = DBDataProvider.DB.hhHangHoas.Where(x => x.IDHangHoa == IDHangHoa).FirstOrDefault(); if (HangHoa != null) { //// trừ tồn kho, //HangHoa.TonKho -= SoLuong; //ghi thẻ kho #region ghi thẻ kho kTheKho thekho = new kTheKho(); thekho.NgayNhap = DateTime.Now; thekho.DienGiai = "Xóa phiếu nhập hàng #" + NhapKho.MaPhieu; thekho.Nhap = 0; thekho.Xuat = SoLuong; thekho.Ton = HangHoa.TonKho -= SoLuong; // trừ tồn kho luôn thekho.HangHoaID = IDHangHoa; thekho.NhanVienID = Formats.IDUser(); DBDataProvider.DB.kTheKhos.InsertOnSubmit(thekho); #endregion } } DBDataProvider.DB.SubmitChanges(); scope.Complete(); } } } catch (Exception ex) { throw ex; } } gridNhaphang.CancelEdit(); e.Cancel = true; gridNhaphang.DataBind(); }
protected void ASPxTreeList1_NodeDeleting(object sender, DevExpress.Web.Data.ASPxDataDeletingEventArgs e) { ASPxTreeList1.DataBind(); Parent.DataBind(); TreeDataSourceView.DataBind(); }
protected void gridKhachHang_Temp_RowDeleting(object sender, DevExpress.Web.Data.ASPxDataDeletingEventArgs e) { }
protected void ASPxGridView1_RowDeleting(object sender, DevExpress.Web.Data.ASPxDataDeletingEventArgs e) { //e.Keys["iType"].ToString(); }
protected void grdItem_RowDeleting(object sender, DevExpress.Web.Data.ASPxDataDeletingEventArgs e) { e.Values["RowStatus"] = Utility.Constant.ROWSTATUS_DELETED; grdItem.DataBind(); }
protected void ASPxGridView1_RowDeleting(object sender, DevExpress.Web.Data.ASPxDataDeletingEventArgs e) { }
protected void grdBuyingProductCategory_RowDeleting(object sender, DevExpress.Web.Data.ASPxDataDeletingEventArgs e) { }
protected void gridChiTietPhieuKiemKho_RowDeleting(object sender, DevExpress.Web.Data.ASPxDataDeletingEventArgs e) { string ID = e.Keys[0].ToString(); data = new dtKiemKho(); }
protected void grdProductSupplier_RowDeleting(object sender, DevExpress.Web.Data.ASPxDataDeletingEventArgs e) { }
protected void grd_Photo_RowDeleting(object sender, DevExpress.Web.Data.ASPxDataDeletingEventArgs e) { e.Values["Id"] = SafeValue.SafeString(e.Values["Id"]); }
protected void gvYHSmsSet_RowDeleting(object sender, DevExpress.Web.Data.ASPxDataDeletingEventArgs e) { DeleteData(e.Keys[0]); e.Cancel = true; InitData(string.Format("maindept='{0}'", SessionBox.GetUserSession().DeptNumber)); }