protected void gridArtifactCodeRule_CustomCallback(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewCustomCallbackEventArgs e) { string[] args = e.Parameters.Split('|'); string command = args[0]; if (command.Equals("Delete")) { bool isSuccess = false; try { if (args.Length < 2) { throw new Exception("Must be pass a key for deleting"); } Guid artifactCodeRuleId = Guid.Parse(args[1]); artifactCodeRuleBO.Delete(session, artifactCodeRuleId); isSuccess = true; } catch (Exception) { throw; } finally { if (isSuccess) { gridArtifactCodeRule.JSProperties["cpEvent"] = "deleted"; } } } }
protected void SourceGrid_CustomCallback(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewCustomCallbackEventArgs e) { rowValues = new List <object>(); switch (e.Parameters) { case "removeSelectedRows": rowValues = TargetGrid.GetSelectedFieldValues(fieldNames); var categoryIDs = new StringBuilder(); for (int i = 0; i < rowValues.Count(); i++) { var categoryID = (rowValues[i] as object[])[0]; if (i < rowValues.Count() - 1) { categoryIDs.AppendFormat("{0}, ", categoryID); } else { categoryIDs.Append(categoryID); } } if (categoryIDs.Length > 0) { TargetDS.DeleteCommand = string.Format("DELETE FROM [CategoriesUpdated] WHERE [CategoryID] IN ({0})", categoryIDs); TargetDS.Delete(); foreach (object[] rowValue in rowValues) { SourceDS.InsertCommand = string.Format( "INSERT INTO [Categories] ([CategoryID], [CategoryName], [Description]) VALUES ({0}, '{1}', '{2}')", rowValue[0], rowValue[1], rowValue[2]); SourceDS.Insert(); } SourceGrid.DataBind(); } break; case "removeAllRows": for (int i = 0; i < TargetGrid.VisibleRowCount; i++) { rowValues.Add(TargetGrid.GetRowValues(i, fieldNames)); } if (rowValues.Count > 0) { TargetDS.DeleteCommand = "DELETE * FROM [CategoriesUpdated]"; TargetDS.Delete(); foreach (object[] rowValue in rowValues) { SourceDS.InsertCommand = string.Format( "INSERT INTO [Categories] ([CategoryID], [CategoryName], [Description]) VALUES ({0}, '{1}', '{2}')", rowValue[0], rowValue[1], rowValue[2]); SourceDS.Insert(); } SourceGrid.DataBind(); } break; } }
protected void grdDataWarehouse_CustomCallback(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewCustomCallbackEventArgs e) { string[] args = e.Parameters.Split('|'); switch (args[0]) { case "delete": try { if (args.Length > 1) { Guid recordId = Guid.Parse(args[1]); Inventory editManufacturerOrg = session.GetObjectByKey <Inventory>(recordId); editManufacturerOrg.RowStatus = Utility.Constant.ROWSTATUS_DELETED; editManufacturerOrg.Save(); grdDataWarehouse.JSProperties.Add("cpEvent", "deleted"); } else { throw new Exception("Must be pass id of the record"); } } catch (Exception) { throw; } break; default: break; } }
protected void grdRequets_CustomCallback(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewCustomCallbackEventArgs e) { var RequestInformations = Business.FacadeAutomation.GetVwRequestFullInformationBusiness().GetByUserID(CurrentUser.ID); grdRequets.DataSource = RequestInformations; grdRequets.DataBind(); }
protected void gridFerias_CustomCallback(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewCustomCallbackEventArgs e) { if (ddlSetor.Text != "") { PreencheGrid(); } }
protected void gridviewReceiptVoucher_CustomCallback(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewCustomCallbackEventArgs e) { string[] args = e.Parameters.Split('|'); switch (args[0]) { case "delete": try { if (args.Length > 1) { VoucherBO voucherBO = new VoucherBO(); Guid recordId = Guid.Parse(args[1]); voucherBO.DeleteLogical(recordId); gridviewReceiptVoucher.JSProperties.Add("cpEvent", "deleted"); } else { throw new Exception("Must be pass id of the record"); } } catch (Exception) { throw; } break; default: break; } }
protected void grdDataWarehouseCategory_CustomCallback(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewCustomCallbackEventArgs e) { string[] args = e.Parameters.Split('|'); switch (args[0]) { case "delete": try { if (args.Length > 1) { Guid recordId = Guid.Parse(args[1]); //toolBLO.DeleteWarehouseCategory(recordId); this.grdDataWarehouseCategory.JSProperties.Add("cpEvent", "deleted"); } else { throw new Exception("Must be pass id of the record"); } } catch (Exception) { throw; } break; default: break; } }
protected void ASPxGridView1_CustomCallback(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewCustomCallbackEventArgs e) { string MachineName = Request.UserHostAddress; string hostIPAddress = Page.Request.UserHostAddress; //IPHostEntry hostInfo = System.Net.Dns.GetHostByAddress(hostIPAddress); MachineName = hostIPAddress; //删除原来记录 string sql = "DELETE FROM RST_QAD_BOMPART_LQ_TEMP where ABOM_USER='******'"; dc.ExeSql(sql); //批量生成 if (listPlan.Items.Count > 0) { for (int i = 0; i < listPlan.Items.Count; i++) { string str = listPlan.Items[i].Text; BomReplaceFactory.QAD_CREATE_PRTPART_LQ(str, MachineName); } } sql = "select ABOM_JHDM ,ABOM_COMP ,ABOM_DESC ,ABOM_WKCTR ,ABOM_QTY ,SJ_FLAG from RST_QAD_BOMPART_LQ where ABOM_USER='******' order by SJ_FLAG DESC,ABOM_JHDM,ABOM_WKCTR"; Session["mmsMaterialSend001"] = sql; ASPxGridView1.DataSource = dc.GetTable(sql); ASPxGridView1.DataBind(); }
protected void gridBuscaServidor_CustomCallback(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewCustomCallbackEventArgs e) { if (e.Parameters == "Op") { UsuarioTroca(); } PreencheGrid(tbBuscapServidor.Text.Trim()); }
protected void gridOnePlace_CustomCallback(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewCustomCallbackEventArgs e) { string sql = "select jhdm,so ,ljdm1 ,ljmc1 ,ljdm2 ,ljmc2 ,gwdm ,tjsj ,qrsj ,tjyh ,qryh ,gzdd ,flag " + "from sjbomthcfm_del where to_date(to_char(tjsj,'yyyy-mm-dd'),'yyyy-mm-dd')>='" + dateFrom.Text + "' AND to_date(to_char(tjsj,'yyyy-mm-dd'),'yyyy-mm-dd')<='" + dateFrom.Text + "' AND GZDD='" + cmbPline.Value.ToString() + "' ORDER BY jhdm,gwdm"; gridOnePlace.DataSource = dc.GetTable(sql); gridOnePlace.DataBind(); }
protected void ASPxGridView2_CustomCallback(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewCustomCallbackEventArgs e) { userManager theUserManager = (userManager)Session["theUserManager"]; string userName = theUserManager.getUserName(); BomReplaceFactory.MW_CREATE_BOMCOMPRST("NOOP", txtSO1.Text, txtPlanCode1.Text, txtSO2.Text, txtPlanCode2.Text, userName); //显示改制bom initBom(); }
protected void gvDetailDiskonJasa2_CustomCallback(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewCustomCallbackEventArgs e) { var diskon = bll.GetDiskonDiberikan(Session["proposal_number"].ToString()); if (diskon.Rows.Count > 0) { gvDetailDiskonJasa2.DataSource = diskon; gvDetailDiskonJasa2.DataBind(); } }
protected void RolesGrid_CustomCallback(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewCustomCallbackEventArgs e) { RolesGrid.Selection.UnselectAll(); if (PermissionsTree.FocusedNode != null) { new Role().ListPermissionRoles((int)PermissionsTree.FocusedNode.GetValue("ID")).ForEach(r => { RolesGrid.Selection.SelectRow(RolesGrid.FindVisibleIndexByKeyValue(r.ID.ToString())); }); } }
protected void ASPxGridView2_CustomCallback(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewCustomCallbackEventArgs e) { string sql = "select a.ljdm1,b.pt_desc2 oldpart_name ,a.GWMC1, a.ljdm2,c.pt_desc2 newpart_name,sl from SJBOMSOTHMUTI a" + " left outer join copy_pt_mstr b on a.ljdm1=b.pt_part" + " left outer join copy_pt_mstr c on a.ljdm2=c.pt_part" + " where so='" + Request["so"].ToString() + "' and jhdm='" + Request["planCode"].ToString() + "' and gzdd='" + Request["plineCode"].ToString() + "' and thgroup='" + cmbGroup.Text + "'"; ASPxGridView2.DataSource = dc.GetTable(sql); ASPxGridView2.DataBind(); }
protected void RolesGrid_CustomCallback(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewCustomCallbackEventArgs e) { RolesGrid.Selection.UnselectAll(); if (UsersGrid.FocusedRowIndex > -1) { new Role().ListUserRoles((long)UsersGrid.GetRowValues(UsersGrid.FocusedRowIndex, "ID")).ForEach(r => { RolesGrid.Selection.SelectRow(RolesGrid.FindVisibleIndexByKeyValue(r.ID.ToString())); }); } }
protected void UsersGrid_CustomCallback(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewCustomCallbackEventArgs e) { UsersGrid.Selection.UnselectAll(); if (RolesGrid.FocusedRowIndex > -1) { Master.UserObject.ListRoleUsers((int)RolesGrid.GetRowValues(RolesGrid.FocusedRowIndex, "ID")).ForEach(u => { UsersGrid.Selection.SelectRow(UsersGrid.FindVisibleIndexByKeyValue(u.ID.ToString())); }); } }
protected void grid_CustomCallback(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewCustomCallbackEventArgs e) { int newPageSize; if (!int.TryParse(e.Parameters, out newPageSize)) { return; } grid.SettingsPager.PageSize = newPageSize; Session[GridCustomPageSizeName] = newPageSize; grid.DataBind(); }
protected void ASPxGridView1_CustomCallback(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewCustomCallbackEventArgs e) { string MachineName = Request.UserHostAddress; string hostIPAddress = Page.Request.UserHostAddress; //IPHostEntry hostInfo = System.Net.Dns.GetHostByAddress(hostIPAddress); MachineName = hostIPAddress; string sql = "delete FROM rst_qad_movepartcal where machinename='" + MachineName + "'"; dc.ExeSql(sql); sql = "SELECT DISTINCT plan_code,plan_so,plan_qty FROM data_plan WHERE to_date(to_char(begin_date,'YYYY-MM-DD'),'yyyy-mm-dd')>=to_date('" + datePlanDate.Text + "','yyyy-mm-dd') and to_date(to_char(begin_date,'YYYY-MM-DD'),'yyyy-mm-dd')<=to_date('" + datePlanDateTo.Text + "','yyyy-mm-dd') and pline_code='" + cmbPline.Value.ToString() + "' and plan_type='A' "; DataTable dt = dc.GetTable(sql); for (int i = 0; i < dt.Rows.Count; i++) { BomReplaceFactory.QAD_CREATE_MOVEPARTCAL(cmbPline.Value.ToString(), dt.Rows[i]["plan_so"].ToString(), dt.Rows[i]["plan_code"].ToString(), dt.Rows[i]["plan_qty"].ToString(), MachineName); } string condition = ""; if (txtStoreman.Text != "") { condition += " and upper(abom_bgy)>=upper('" + txtStoreman.Text + "') and upper(abom_bgy)<=upper('" + txtStoreman2.Text + "') "; } if (txtGwdm.Text != "") { condition += " and upper(ABOM_WKCTR)=upper('" + txtGwdm.Text + "')"; } if (txtLj.Text != "") { condition += " and upper(ABOM_COMP)=upper('" + txtLj.Text + "')"; } sql = "SELECT ABOM_COMP ,ABOM_WKCTR ,ABOM_KW ,SUM(ABOM_QTY) ABOM_QTY,abom_desc,abom_bgy from rst_qad_movepartcal where machinename='" + MachineName + "' "; if (CheckSn.Checked) { sql += condition + " and abom_comp in(select upper(ljdm) from atpubomthreset where to_char(rqsj,'yyyy-mm')='" + datePlanDate.Text.Substring(0, 7) + "')"; } else { sql = sql + condition; } sql += " GROUP BY ABOM_COMP,ABOM_WKCTR,ABOM_KW,abom_desc,abom_bgy ORDER BY ABOM_COMP,ABOM_WKCTR"; Session["mmsMaterialRequisitionQry001"] = sql; ASPxGridView1.DataSource = dc.GetTable(sql); ASPxGridView1.DataBind(); }
protected void GrdVwClientesSoftAdmin_CustomCallback(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewCustomCallbackEventArgs e) { try { Session["Cliente"] = FocusedCliente["CLI_ID"]; } catch (Exception) { Session["Cliente"] = 0; throw; } }
protected void ASPxGridView1_CustomCallback(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewCustomCallbackEventArgs e) { if (e.Parameters == null) { return; } string[] param = e.Parameters.Split(';'); if (param.Length == 2 && param[0] == "customexpand") { ASPxGridView1.ExpandRow(Convert.ToInt32(param[1]), true); } }
protected void ASPxGridView1_CustomCallback(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewCustomCallbackEventArgs e) { if (e.Parameters == "1") { Session["currentSource"] = "Datasource1"; BindToDS1(); } if (e.Parameters == "2") { Session["currentSource"] = "Datasource2"; BindToDS2(); } }
protected void grdBuyingProductCategory_CustomCallback(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewCustomCallbackEventArgs e) { string str = e.Parameters; if (str == "0") { bind_tiendogiaohang(); } else { bind_tiendothanhtoan(); } }
protected void dsGridPreviewData_CustomCallback(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewCustomCallbackEventArgs e) { var inq = new InqDefineSourceMDX(SelectedFields, SelectedMetrics, SelectedFilters) { PreffixDimTable = "AR", OlapCubeName = Helpers.GetCubeName(GlobalVar.DbOLAP_ConnectionStr_Tiny) }; var ds = (new MdxExecuter(GlobalVar.DbOLAP_ConnectionStr_Tiny)).ExecuteDataSet(inq.ToMDX()); dsGridPreviewData.DataSource = ds; dsGridPreviewData.DataBind(); }
protected void grdInventoryCommand_CustomCallback(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewCustomCallbackEventArgs e) { string[] para = e.Parameters.Split('|'); InventoryAuditArtifact _inventoryAuditArtifact = session.GetObjectByKey <InventoryAuditArtifact>(Guid.Parse(para[0])); if (_inventoryAuditArtifact != null) { _inventoryAuditArtifact.ApprovalStatus = Constant.APRROVE_YES; _inventoryAuditArtifact.Save(); grdInventoryCommand.JSProperties.Add("cpRefreshGrid", "refresh"); } }
protected void ASPxGridView1_CustomCallback(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewCustomCallbackEventArgs e) { string sql = "select a.oldpart ,b.pt_desc2 oldpart_name, a.newpart ,c.pt_desc2 newpart_name,a.sl,d.location_code from sjbomthset a" + " left join copy_pt_mstr b on a.oldpart=b.pt_part" + " left join copy_pt_mstr c on a.newpart=c.pt_part" + " left join DATA_PLAN_STANDARD_BOM d on a.oldpart = d.item_code and plan_code='" + Request["planCode"].ToString() + "' " + " where (so='" + Request["so"].ToString() + "' or so='" + thgxjx + "') and settype='1' and usetime<=to_date(to_char(sysdate,'yyyy-mm-dd'),'yyyy-mm-dd') and endtime>=to_date(to_char(sysdate,'yyyy-mm-dd'),'yyyy-mm-dd') and thgroup='" + cmbGroup.Text + "'"; //string sql = "select a.oldpart ,b.pt_desc2 oldpart_name, a.newpart ,c.pt_desc2 newpart_name,a.sl,d.location_code from vw_DATA_PLAN_STANDARD_BOM d where d.plan_so='SO42846' and d.plan_code='E20160918-01' and d.item_code in (select oldpart from sjbomthset where (so='" + Request["so"].ToString() + "' or so='" + thgxjx + "') and settype='1' and usetime<=to_date(to_char(sysdate,'yyyy-mm-dd'),'yyyy-mm-dd') and endtime>=to_date(to_char(sysdate,'yyyy-mm-dd'),'yyyy-mm-dd') )"; gridMaterial.DataSource = dc.GetTable(sql); gridMaterial.DataBind(); }
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 ASPxGridView1_CustomCallback(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewCustomCallbackEventArgs e) { //判断是否有人在转换,如果是退出,提示随后再加 string sql = "select bomrunning,bomuser from atpusysstate1"; DataTable dt = dc.GetTable(sql); if (dt.Rows.Count > 0) { if (dt.Rows[0][0].ToString() == "1") { return; } } //加入转换用户 userManager theUserManager = (userManager)Session["theUserManager"]; string userName = theUserManager.getUserName(); sql = "update atpusysstate1 set bomuser='******',bomrunning=1"; //删除原来记录 sql = "DELETE FROM RST_QAD_MOVEPART"; dc.ExeSql(sql); string MachineName = Request.UserHostAddress; //批量生成 if (listPlan.Items.Count > 0) { for (int i = 0; i < listPlan.Items.Count; i++) { string str = listPlan.Items[i].Text; string[] strs = str.Split(';'); string planCode = strs[0].ToString(); string so = strs[1].ToString(); string qty = strs[2].ToString(); BomReplaceFactory.QAD_CREATE_MOVEPART_LQ2(cmbPline.Value.ToString(), so, planCode, qty); } } string qadsite = dc.GetValue("select FUNC_GET_PLANSITE( '" + cmbPline.Value.ToString() + "', 'D') from dual"); sql = "SELECT ABOM_COMP ,ABOM_WKCTR ,ABOM_KW ,SUM(ABOM_QTY) QTY1 from rst_qad_movepart WHERE gzdd='" + qadsite + "' GROUP BY ABOM_COMP,ABOM_WKCTR,ABOM_KW ORDER BY ABOM_COMP,ABOM_WKCTR"; //sql = "SELECT ABOM_COMP ,ABOM_WKCTR ,ABOM_KW ,SUM(ABOM_QTY) QTY1 from rst_qad_movepart WHERE abom_user='******' GROUP BY ABOM_COMP,ABOM_WKCTR,ABOM_KW ORDER BY ABOM_COMP,ABOM_WKCTR"; Session["mmsMaterialMoveLineside001"] = sql; ASPxGridView1.DataSource = dc.GetTable(sql); ASPxGridView1.DataBind(); }
protected void gridCustomerProfile_CustomCallback(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewCustomCallbackEventArgs e) { List <Person> p = (Session[this.ClientID + "listIPerson"] as List <Person>); if (p != null && p.Count > 0) { Person respondent = p[0]; if (null != respondent) { Session[this.ClientID + "CustomerProfileList"] = iSabaya.Response.List(iSabayaContext, FindQuestionniareCode((Convert.ToInt32(comboCustomerProfile.SelectedItem.Value))), respondent); gridCustomerProfile.DataBind(); } } }
protected void detailGridView2_CustomCallback(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewCustomCallbackEventArgs e) { Thread.Sleep(1000); object values = masterGrid2.GetRowValues(masterGrid2.FocusedRowIndex, new string[] { "CategoryID" }); detailGridView2.DataSource = null; string filterExpression = "CategoryID='" + values.ToString() + "'"; Session["FilterExpression2"] = filterExpression; adsProducts2.FilterExpression = filterExpression; detailGridView2.DataSource = adsProducts2; detailGridView2.PageIndex = 0; detailGridView2.DataBind(); }
protected void ASPxGridView1_CustomCallback(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewCustomCallbackEventArgs e) { string MachineName = Request.UserHostAddress; string gzdd1 = ""; try { gzdd1 = cmbPline.Value.ToString(); } catch { } string sql = "select so ,ljdm1 ,ljdm2 , jhdm ,lrsj , ygmc from SJBOMSOTH where gzdd='" + gzdd1 + "' and LRSJ>=TO_DATE('" + datePlanDate.Text + "','YYYY-MM-DD') and LRSJ<=TO_DATE('" + datePlanDateTo.Text + "','YYYY-MM-DD')"; Session["mmsReplaceReport001"] = sql; DataTable dt = dc.GetTable(sql); ASPxGridView1.DataSource = dc.GetTable(sql); ASPxGridView1.DataBind(); }