protected void gvNeraca_CustomButtonCallback(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewCustomButtonCallbackEventArgs e) { BaganAkunDetail detail = new BaganAkunDetail(); var row = (object[])gvNeraca.GetRowValues(e.VisibleIndex, "account_id", "account_name", "SaldoAwal", "Debet", "Kredit", "SaldoAkhir", "cabang"); detail.Coa = row[0].ToString(); detail.Deskripsi = row[1].ToString(); detail.Periode = Convert.ToDateTime(deTanggalMulai.Value).ToString("dd MMMM yyyy") + " s/d " + Convert.ToDateTime(deTanggalSampai.Value).ToString("dd MMMM yyyy"); detail.TglMulai = Convert.ToDateTime(deTanggalMulai.Value).ToString("dd/MM/yyyy"); detail.Tglselesai = Convert.ToDateTime(deTanggalSampai.Value).ToString("dd/MM/yyyy"); detail.SaldoAwal = row[2].ToString(); detail.Debet = row[3].ToString(); detail.Kredit = row[4].ToString(); detail.SaldoAkhir = row[5].ToString(); detail.KodeCabang = Convert.ToInt32(row[6]); //if (cbbBranch.Value.ToString() == "all") //{ // detail.KodeCabang = 0; //} //else //{ // detail.KodeCabang = Convert.ToInt32(cbbBranch.Value); //} Session["detailbagan"] = detail; DevExpress.Web.ASPxClasses.ASPxWebControl.RedirectOnCallback("DetailRepBaganAkun.aspx"); }
protected void gvBagan_CustomButtonCallback(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewCustomButtonCallbackEventArgs e) { var nobukti = gvBagan.GetRowValues(e.VisibleIndex, "NoBukti"); Session["lihatjurnal"] = nobukti; DevExpress.Web.ASPxClasses.ASPxWebControl.RedirectOnCallback("~/Reporting/RepLainLain/RepLihatDetailJurnal.aspx"); }
protected void gvPenyaluran_CustomButtonCallback(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewCustomButtonCallbackEventArgs e) { if (e.ButtonID == "btnEdit") { Session["lihatjurnal"] = gvPenyaluran.GetRowValues(e.VisibleIndex, "NoRef"); Session["bl"] = "0"; DevExpress.Web.ASPxClasses.ASPxWebControl.RedirectOnCallback(@"~/Reporting/RepLainLain/RepLihatDetailJurnal.aspx"); } }
protected void grdRequets_CustomButtonCallback(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewCustomButtonCallbackEventArgs e) { try { if (e.ButtonID != "btnSendG") { return; } var RowID = grdRequets.GetRowValues(e.VisibleIndex, "RequestID").ToLong(); var RequestDocument = Business.FacadeAutomation.GetRequestDocumentsBusiness().GetByID(RowID); if (RequestDocument == null) { throw new Exception(Resources.Texts.NotFound); } if (RequestDocument.Sent == true) { throw new Exception(Resources.Texts.IsSentBefore); } var RequestTypeDetails = Business.FacadeAutomation.GetRequestTypeDetailBusiness().GetByTypeID(RequestDocument.TypeID); var SelectOldLevel = RequestTypeDetails.FirstOrDefault(r => r.LevelID == RequestDocument.CurrentLevel && r.Priority == RequestDocument.LevelPriority); if (SelectOldLevel == null) { throw new Exception(Resources.Texts.NotFound); } var Next = RequestTypeDetails.IndexOf(SelectOldLevel) + 1; if (Next >= RequestTypeDetails.Count) { //TODO : این جا باید بگیم که تموم شه این درخواست(ارسال بشه و به معنی رسیدگی شده بشه) چون ممکنه همون اول کابری درخواست بده که توی مرحله آخر هست throw new Exception(Resources.Texts.NoLevelForSend); } var SelectNewLevel = RequestTypeDetails[Next]; RequestDocument.CurrentLevel = SelectNewLevel.LevelID; RequestDocument.LevelPriority = SelectNewLevel.Priority; RequestDocument.Sent = true; RequestDocument.Status = Resources.Texts.Status_Sent; RequestDocument.Save(); grdRequets_CustomCallback(null, null); } catch (Exception ex) { throw new Exception(ex.Message); } }
protected void ASPxGridView1_CustomButtonCallback(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewCustomButtonCallbackEventArgs e) { //edie if (e.ButtonID == "Edit") { string rmesId = ASPxGridView1.GetRowValues(e.VisibleIndex, "RMES_ID").ToString(); ASPxGridView1.JSProperties.Add("cpCallbackName", "Edit"); ASPxGridView1.JSProperties.Add("cpRmesId", rmesId); } }
protected void gv_Users_CustomCallback(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewCustomButtonCallbackEventArgs e) { if (e.ButtonID == "Activation") { if (UserSet.activatesuspend(gv_Users.GetRowValues(e.VisibleIndex, "UserID").ToString()) == true) { gv_Users.DataBind(); } } }
protected void gvRealisasiAkadDetail_CustomButtonCallback(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewCustomButtonCallbackEventArgs e) { if (e.ButtonID == "Opr1") { btnEditAction(e.VisibleIndex); } if (e.ButtonID == "Opr2") { btnDetailAction(e.VisibleIndex); } }
protected void gvDiskonJasa_CustomButtonCallback(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewCustomButtonCallbackEventArgs e) { if (e.ButtonID == "btnTambah") { btnTambahAction(e.VisibleIndex); } else if (e.ButtonID == "debitur") { getKartuPiutang(e.VisibleIndex); } }
protected void gvPembayaran_CustomButtonCallback(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewCustomButtonCallbackEventArgs e) { if (e.ButtonID == "Tambah") { btnDetail(e.VisibleIndex); } else if (e.ButtonID == "Kartu") { btnKartu(e.VisibleIndex); } }
protected void gvPengembalianKelebihan_CustomButtonCallback(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewCustomButtonCallbackEventArgs e) { if (e.ButtonID == "btnTambah") { btnTambahAction(e.VisibleIndex); } else if (e.ButtonID == "Kartu") { getKartuPiutang(e.VisibleIndex); } }
protected void gvClosing_CustomButtonCallback(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewCustomButtonCallbackEventArgs e) { if (e.ButtonID == "btnHitungUlang") { Pertamina.PKBL.BLL.Administer.ClosingBll bll = new BLL.Administer.ClosingBll(); ActivityLog log = new ActivityLog(); ActivityLogBll logBll = new ActivityLogBll(); string host = Request.UserHostName; string ipaddress = Request.UserHostAddress; string userName = Session["user"].ToString(); if (String.IsNullOrEmpty(ipaddress)) { ipaddress = HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"]; } log.HostName = host; log.IPAddress = ipaddress; log.Action = "Hitung Ulang Closing Kolektibilitas "; log.UserName = userName; try { var tahun = Convert.ToInt32(gvClosing.GetRowValues(e.VisibleIndex, "tahun").ToString().Trim()); var bulan = Convert.ToInt32(gvClosing.GetRowValues(e.VisibleIndex, "bulan").ToString().Trim()); bll.HitungUlangKolekti(bulan, tahun); gvClosing.DataSource = bll.GetHistoryKolekti(); gvClosing.DataBind(); ViewState["script"] = "<script>alert('hitung ulang closing bulan " + cbbBulan.SelectedItem.Text + " " + cbbTahun.SelectedItem.Value + " sukses'); </script>"; log.Type = "S"; log.Description = log.Action + "Sukses oleh id" + ' ' + userName; } catch (Exception ex) { ViewState["script"] = "<script>alert('hitung ulang closing bulan " + cbbBulan.SelectedItem.Text + " " + cbbTahun.SelectedItem.Value + " gagal'); </script>"; log.Type = "E"; log.Description = "Hitung Ulang Closing Kolektibilitas Gagal : " + ex.Message; } finally { logBll.InsertActivity(log); } } }
protected void ASPxGridView2_CustomButtonCallback(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewCustomButtonCallbackEventArgs e) { bool move = e.ButtonID == "sy" ? true : false; int PROCESSID = Convert.ToInt32(ASPxGridView2.GetRowValues(e.VisibleIndex, "PROCESSID")); GhtnTech.SEP.OraclDAL.DALPROCESS pro = new GhtnTech.SEP.OraclDAL.DALPROCESS(); DataTable dt = pro.GetDALPROCESS(" and PROCESSID=" + PROCESSID.ToString()).Tables[0]; int sort = Convert.ToInt32(dt.Rows[0]["SERIALNUMBER"]); int WORKTASKID = Convert.ToInt32(dt.Rows[0]["WORKTASKID"]); try { //修改后-删除某记录后也可进行排序 DataSet ds = OracleHelper.Query("select SERIALNUMBER from (select SERIALNUMBER from PROCESS where WORKTASKID='" + WORKTASKID + "' order by SERIALNUMBER desc nulls last) where ROWNUM = 1"); for (int i = 1; i <= int.Parse(ds.Tables[0].Rows[0]["SERIALNUMBER"].ToString()); i++) { int otherID = -1; try { DataSet dsP = pro.GetDALPROCESS(" and WORKTASKID = " + WORKTASKID.ToString() + " and SERIALNUMBER = " + Convert.ToString(move ? sort - i : sort + i)); otherID = Convert.ToInt32(dsP.Tables[0].Rows[0]["PROCESSID"].ToString()); } catch { continue; } pro.UpdateDALPROCESS_SERIALNUMBER(PROCESSID, move ? sort - i : sort + i); pro.UpdateDALPROCESS_SERIALNUMBER(otherID, sort); break; } ObjectDataSource1.SelectParameters["strWhere"].DefaultValue = "and WORKTASKID = " + WORKTASKID + ""; ASPxGridView2.DataSourceID = "ObjectDataSource1"; ASPxGridView2.DataBind(); //连号方可排序 //int otherID = Convert.ToInt32(pro.GetDALPROCESS(" and WORKTASKID=" + WORKTASKID.ToString() + " and SERIALNUMBER=" + Convert.ToString(move ? sort - 1 : sort + 1)).Tables[0].Rows[0]["PROCESSID"]); //pro.UpdateDALPROCESS_SERIALNUMBER(PROCESSID, move ? sort - 1 : sort + 1); //pro.UpdateDALPROCESS_SERIALNUMBER(otherID, sort); //ObjectDataSource1.SelectParameters["strWhere"].DefaultValue = "and WORKTASKID = " + WORKTASKID + ""; //ASPxGridView2.DataSourceID = "ObjectDataSource1"; //ASPxGridView2.DataBind(); } catch { string msg = move ? "当前是第一行,无法上移" : "当前是最后一行,无法下移"; throw new Exception(msg); } }
protected void gridKartuPiutang_CustomButtonCallback(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewCustomButtonCallbackEventArgs e) { if (e.ButtonID == "btnDetail") { Session["proposal_number"] = gridKartuPiutang.GetRowValues(e.VisibleIndex, "proposal_number"); DevExpress.Web.ASPxClasses.ASPxWebControl.RedirectOnCallback("Detail_Kartu_Piutang.aspx"); //Response.Write("<script>window.open('Detail_Kartu_Piutang.aspx')</script>"); } else if (e.ButtonID == "btnPrint") { Session["proposal_number"] = gridKartuPiutang.GetRowValues(e.VisibleIndex, "proposal_number"); //DevExpress.Web.ASPxClasses.ASPxWebControl.RedirectOnCallback("SuratKartuPiutang.aspx"); //Response.Write("<script>window.open('SuratKartuPiutang.aspx')</script>"); } }
protected void gvRescheduleKemitraan_CustomButtonCallback(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewCustomButtonCallbackEventArgs e) { if (e.ButtonID == "btnReschedule") { var id = gvRescheduleKemitraan.GetRowValues(e.VisibleIndex, "proposal_number"); Session["proposal_number"] = id; DevExpress.Web.ASPxClasses.ASPxWebControl.RedirectOnCallback("DetailReschedulePiutangKemitraan.aspx"); } if (e.ButtonID == "btnPrint") { var id = gvRescheduleKemitraan.GetRowValues(e.VisibleIndex, "proposal_number"); DevExpress.Web.ASPxClasses.ASPxWebControl.RedirectOnCallback("~/Reporting/PrintKartuPiutang.aspx?proposal=" + id); } }
protected void ASPxGridView1_CustomButtonCallback(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewCustomButtonCallbackEventArgs e) { string csname = "testscript"; Type cstype = this.GetType(); ClientScriptManager cs = Page.ClientScript; if (!cs.IsStartupScriptRegistered(cstype, csname)) { { string cstext = "NewProject.Show() ;"; cs.RegisterStartupScript(cstype, csname, cstext, true); } } }
protected void gvJadwalPembayaran_CustomButtonCallback(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewCustomButtonCallbackEventArgs e) { if (e.ButtonID == "Detail") { if (gvJadwalPembayaran.GetRowValues(e.VisibleIndex, "existPiutang").ToString() == "1") { //e.Image.Url = "../content/images/checklist.png"; //var id = gvJadwalPembayaran.GetRowValues(e.VisibleIndex, gvJadwalPembayaran.KeyFieldName); //Session["proposal_number"] = id; //DevExpress.Web.ASPxClasses.ASPxWebControl.RedirectOnCallback("../Akuntansi/Detail_Kartu_Piutang.aspx"); btnDetailAction(e.VisibleIndex); } else { btnDetailAction(e.VisibleIndex); } } }
// GridView的编辑事件,操作中的查看和删除按钮 protected void grdView_CustomButtonCallback(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewCustomButtonCallbackEventArgs e) { if (e.ButtonID.Equals("btnDelete")) { // 表格“删除” string id, msg; id = grdView.GetRowValues(e.VisibleIndex, "ID").ToString(); IDao dao = DaoFactory.GetDao("DaoBizTraining"); dao.Params["Oper"] = Session["MyUserName"].ToString(); int rtn = dao.Delete(id, out msg); if (rtn == 0) { msg = "操作成功!"; loadTraining(); //成功后刷新界面 } else { msg = "错误:" + msg; } grdView.JSProperties["cpMsg"] = msg; } }
protected void gvMonitoring_CustomButtonCallback(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewCustomButtonCallbackEventArgs e) { if (e.ButtonID == "btnTambah") { btnTambahAction(e.VisibleIndex); } else if (e.ButtonID == "btnEdit") { btnEditAction(e.VisibleIndex); } else if (e.ButtonID == "button1") { var text = gvMonitoring.GetRowValues(e.VisibleIndex, "I").ToString(); var mitraId = gvMonitoring.GetRowValues(e.VisibleIndex, gvMonitoring.KeyFieldName); Session["mitraId"] = mitraId; Session["tglMon"] = text; DevExpress.Web.ASPxClasses.ASPxWebControl.RedirectOnCallback("TambahMonitoringMitra.aspx"); } else if (e.ButtonID == "button2") { var text = gvMonitoring.GetRowValues(e.VisibleIndex, "II").ToString(); var mitraId = gvMonitoring.GetRowValues(e.VisibleIndex, gvMonitoring.KeyFieldName); Session["mitraId"] = mitraId; Session["tglMon"] = text; DevExpress.Web.ASPxClasses.ASPxWebControl.RedirectOnCallback("TambahMonitoringMitra.aspx"); } else if (e.ButtonID == "button3") { var text = gvMonitoring.GetRowValues(e.VisibleIndex, "III").ToString(); var mitraId = gvMonitoring.GetRowValues(e.VisibleIndex, gvMonitoring.KeyFieldName); Session["mitraId"] = mitraId; Session["tglMon"] = text; DevExpress.Web.ASPxClasses.ASPxWebControl.RedirectOnCallback("TambahMonitoringMitra.aspx"); } }
protected void gvListAkad_CustomButtonCallback(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewCustomButtonCallbackEventArgs e) { btnAction(e.VisibleIndex); DevExpress.Web.ASPxClasses.ASPxWebControl.RedirectOnCallback(@"~\Kemitraan\RealisasiListAkadDetail.aspx"); }
protected void gvPenyalur_CustomButtonCallback(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewCustomButtonCallbackEventArgs e) { //nama.Text = e.ButtonID.ToString(); }
protected void gvPerPinjBinLingk_CustomButtonCallback(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewCustomButtonCallbackEventArgs e) { getKartuPiutang(e.VisibleIndex); }
protected void gvMitraBermasala_CustomButtonCallback(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewCustomButtonCallbackEventArgs e) { getKartuPiutang(e.VisibleIndex); }
protected void gvPenyaluranSaldo_CustomButtonCallback(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewCustomButtonCallbackEventArgs e) { }
protected void gvPerwabPanjar_CustomButtonCallback(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewCustomButtonCallbackEventArgs e) { btnPersetujuanPerwab(e.VisibleIndex); }
protected void gvPenyaluran_CustomButtonCallback(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewCustomButtonCallbackEventArgs e) { btnAction(e.VisibleIndex); }
protected void delete_Callback(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewCustomButtonCallbackEventArgs e) { ((List <Payment>)Session["listPayment"]).RemoveAt(e.VisibleIndex); gridPaymetod.DataSource = Session["listPayment"]; gridPaymetod.DataBind(); }