//protected void btnBulkImport_Click(object sender, EventArgs e) // { // Response.Redirect("~/BulkImport/BulkReportImport.aspx?IMPORT_ID=12&RetUrl=~/Procurement/POBatchPlan.aspx"); // } protected void ddlStatus_SelectedIndexChanged(object sender, Telerik.Web.UI.DropDownListEventArgs e) { if (ddlStatus.SelectedValue != "") { if (!WebTools.UserInRole("BATCH_ADMIN")) { RadWindowManager1.RadAlert("Access denied.", 300, 150, "Warning", ""); return; } if (itemsGrid.SelectedIndexes.Count == 0) { Master.ShowWarn("Please select a record to continue."); return; } try { string batch_id = itemsGrid.SelectedValue.ToString(); string sql = "UPDATE PIP_PO_BATCH_PLAN SET STATUS='" + ddlStatus.SelectedValue + "' WHERE BATCH_ID=" + batch_id; WebTools.ExeSql(sql); RadWindowManager1.RadAlert("Batch Status Updated.", 300, 150, "Success", ""); } catch (Exception ex) { Master.ShowError(ex.Message); } itemsGrid.Rebind(); ddlStatus.DataBind(); } }
protected void ddlDays_SelectedIndexChanged(object sender, Telerik.Web.UI.DropDownListEventArgs e) { if (!string.IsNullOrEmpty(ddlMaterAccounts.SelectedValue)) { FillDevions(); } }
//protected void ddJoint1_DataBinding(object sender, EventArgs e) //{ // ddJoint1.Items.Clear(); // ddJoint1.Items.Add(new ListItem("(Select)", "-1")); //} //protected void ddJoint2_DataBinding(object sender, EventArgs e) //{ // ddJoint2.Items.Clear(); // ddJoint2.Items.Add(new ListItem("(Select)", "-1")); //} protected void ddWelder_SelectedIndexChanged(object sender, Telerik.Web.UI.DropDownListEventArgs e) { string joint_id = WebTools.GetExpr("JOINT_ID", "PIP_NDE_REQUEST_JOINTS", "NDE_ITEM_ID=" + Request.QueryString["NDE_ITEM_ID"]); rcbpj1.ClearSelection(); rcbpj2.ClearSelection(); rcbpj1.Enabled = true; rcbpj2.Enabled = true; ResetPJ1.Visible = false; ResetPJ2.Visible = false; string penalty_jnt1 = WebTools.GetExpr("PENALTY_JNT1", "PIP_PENALTY_JOINTS", "JOINT_ID=" + joint_id + " AND PENALTY_WELDER_ID=" + ddWelder.SelectedValue.ToString()); string penalty_jnt2 = WebTools.GetExpr("PENALTY_JNT2", "PIP_PENALTY_JOINTS", "JOINT_ID=" + joint_id + " AND PENALTY_WELDER_ID=" + ddWelder.SelectedValue.ToString()); if (penalty_jnt1 != "") { RadComboBoxItem item1 = new RadComboBoxItem(); item1.Text = WebTools.GetExpr("JOINT_TITLE", "VIEW_JOINTS_SIMPLE_WELDING", "JOINT_ID=" + penalty_jnt1); item1.Value = penalty_jnt1; rcbpj1.Items.Add(item1); rcbpj1.SelectedValue = penalty_jnt1; rcbpj1.Enabled = false; ResetPJ1.Visible = true; } if (penalty_jnt2 != "") { RadComboBoxItem item2 = new RadComboBoxItem(); item2.Text = WebTools.GetExpr("JOINT_TITLE", "VIEW_JOINTS_SIMPLE_WELDING", "JOINT_ID=" + penalty_jnt2); item2.Value = penalty_jnt2; rcbpj2.Items.Add(item2); rcbpj2.SelectedValue = penalty_jnt2; rcbpj2.Enabled = false; ResetPJ2.Visible = true; } }
protected void BindMagazinesIssues(object sender, Telerik.Web.UI.DropDownListEventArgs e) { if (dd_issue.Items.Count > 0 && dd_issue.SelectedItem != null && dd_issue.SelectedItem.Text != String.Empty) { String qry = "SELECT MagazineName, CONCAT(MagazineLink,'|',MagazineImageURL) as 'mag_info' FROM db_magazinelinks ml, db_magazine m " + "WHERE ml.MagazineID = m.MagazineID AND IssueName=@book_name ORDER BY MagazineName"; DataTable dt_magazines = SQL.SelectDataTable(qry, "@book_name", dd_issue.SelectedItem.Text); dd_magazine.DataSource = dt_magazines; dd_magazine.DataTextField = "MagazineName"; dd_magazine.DataValueField = "mag_info"; dd_magazine.DataBind(); bool HasThumbs = dd_magazine.Items.Count > 0 && dd_magazine.SelectedItem != null; if (!HasThumbs && sender != null) { Util.PageMessageAlertify(this, "There are no thumbnails/links for this issue..", "Oh"); } tr_preview.Visible = HasThumbs; btn_import.Visible = HasThumbs; if (HasThumbs) { BindMagazineOrBrochurePreview(true); } } }
protected void ddlItemList_SelectedIndexChanged(object sender, Telerik.Web.UI.DropDownListEventArgs e) { string selectedText = ddlItemList.SelectedItem.Text; string mir_id = WebTools.GetExpr("MAT_RCV_ID", "PIP_MAT_EXCEPTION_REP", " WHERE EXCP_ID = " + Request.QueryString["EXCP_ID"]); string TYPE_ID = WebTools.GetExpr("TYPE_ID", "PIP_MAT_EXCEPTION_REP", " WHERE EXCP_ID = " + Request.QueryString["EXCP_ID"]); string[] t = selectedText.Split('-'); if (t.Length > 1) { txtMRItem.Text = t[0]; // txtMatCode.Text = t[1]; if (TYPE_ID == "2") { txtPOitem.Text = "0"; txtHeatNo.Text = WebTools.GetExpr("HEAT_NO", "PIP_MAT_TRANSFER_RCV_DT", " WHERE RCV_ID='" + mir_id + "' AND MR_ITEM_NO = '" + t[0] + "'"); txtMatDescr.Text = WebTools.GetExpr("MAT_DESCR", "PIP_MAT_STOCK", " WHERE MAT_CODE1='" + t[1] + "'"); } else { txtPOitem.Text = WebTools.GetExpr("PO_ITEM", "VIEW_MRIR_ESD", " WHERE MIR_ID='" + mir_id + "' AND MIR_ITEM = '" + t[0] + "'"); txtHeatNo.Text = WebTools.GetExpr("HEAT_NO", "VIEW_MRIR_ESD", " WHERE MIR_ID='" + mir_id + "' AND MIR_ITEM = '" + t[0] + "'"); txtMatDescr.Text = WebTools.GetExpr("MAT_DESCR", "VIEW_MRIR_ESD", " WHERE MIR_ID='" + mir_id + "' AND MIR_ITEM = '" + t[0] + "'"); } } int start = selectedText.IndexOf("-"); txtMatCode.Text = selectedText.Substring(start + 1, (selectedText.Length) - (start + 1)); }
protected void BindBuckets(object sender, Telerik.Web.UI.DropDownListEventArgs e) { RadDropDownList dd_project = (RadDropDownList)sender; RadDropDownList dd_bucket = null; if (dd_project.ID == "dd_del_move_project") { dd_bucket = dd_del_move_bucket; if (dd_del_move_project.SelectedItem.Text.Contains("Just delete")) { dd_bucket.Items.Clear(); dd_bucket.Enabled = false; dd_bucket = null; } } else { dd_bucket = dd_buckets; } if (dd_bucket != null) { dd_bucket.Enabled = true; LeadsUtil.BindBuckets(dd_project, dd_bucket, hf_project_id.Value, true); } Util.ResizeRadWindow(this); }
protected void DDLTblCat_SelectedIndexChanged(object sender, Telerik.Web.UI.DropDownListEventArgs e) { if (string.IsNullOrEmpty(this.DDLTblCat.SelectedItem.Value)) { lblDQIParamMsg.Text = MessageFormatter.GetFormattedErrorMessage("Please select a Catalog."); return; } //DDLTblCol.Items.Add(new ListItem("--SELECT TABLE COLUMN--", "")); //DDLTblCol.AppendDataBoundItems = true; String strQuery = "SELECT COLUMNID,COLUMN_DESC,IMPORTANCE_LEVEL,COLUMN_WEIGHT,REGEX,CAST(COLUMN_REQUIRED AS number) AS COLMN_REQUIRED FROM MDM_DQI_PARAMETERS WHERE TABLE_DESC=:TABLE_DESC"; OracleCommand objCmd = new OracleCommand(); con = new OracleConnection(new Connection().ConnectionString); objCmd.Parameters.Add(":TABLE_DESC", DDLTblCat.SelectedItem.Value); objCmd.CommandType = CommandType.Text; objCmd.CommandText = strQuery; objCmd.Connection = con; objCmd.BindByName = true; try { con.Open(); DataSet ds = new DataSet(); OracleDataAdapter da = new OracleDataAdapter(); da.SelectCommand = objCmd; da.Fill(ds); if (ds.Tables[0].Rows.Count > 0) { GridView1.DataSource = ds; GridView1.DataBind(); this.btnUpdateDQIParam.Visible = true; } else { ds.Tables[0].Rows.Add(ds.Tables[0].NewRow()); GridView1.DataSource = ds; GridView1.DataBind(); int columncount = GridView1.Rows[0].Cells.Count; GridView1.Rows[0].Cells.Clear(); GridView1.Rows[0].Cells.Add(new TableCell()); GridView1.Rows[0].Cells[0].ColumnSpan = columncount; GridView1.Rows[0].Cells[0].Text = "No Records Found"; } } catch (Exception ex) { this.lblDQIParamMsg.Text = MessageFormatter.GetFormattedErrorMessage(ex.Message); } finally { con.Close(); con.Dispose(); } }
protected void ddlGoodsFatherName_SelectedIndexChanged(object sender, Telerik.Web.UI.DropDownListEventArgs e) { ddlGoodsSonName.Items.Clear(); ddlGoodsSonName.Items.Add(new DropDownListItem("全部", "")); ddlGoodsSonName.DataSource = CommoditySon_Bll.GetList(" CommodityFatherID ='" + ddlGoodsFatherName.SelectedValue + "' "); ddlGoodsSonName.DataTextField = "CommoditySonName"; ddlGoodsSonName.DataValueField = "CommoditySonID"; ddlGoodsSonName.DataBind(); ddlGoodsSonName.SelectedText = "请选择"; }
protected void ddlReusable_SelectedIndexChanged(object sender, Telerik.Web.UI.DropDownListEventArgs e) { if (ddlReusable.SelectedValue.ToString() == "N") { btnSubmit.Enabled = false; RadWindowManager1.RadAlert("Not Reusable Material to be entered in Material Quarantine", 300, 150, "Warning", ""); } if (ddlReusable.SelectedValue.ToString() == "Y") { btnSubmit.Enabled = true; } }
protected void PaddingChanged(object sender, Telerik.Web.UI.DropDownListEventArgs e) { RadDropDownList dd_margin = (RadDropDownList)sender; if (dd_margin.ToolTip == "Overall") { dd_padding_bottom.SelectedIndex = dd_padding_left.SelectedIndex = dd_padding_right.SelectedIndex = dd_padding_top.SelectedIndex = 0; } else if (dd_margin.ToolTip == "Top" || dd_margin.ToolTip == "Bottom" || dd_margin.ToolTip == "Left" || dd_margin.ToolTip == "Right") { dd_padding_overall.SelectedIndex = 0; } BindMagazineOrBrochurePreview(tr_issue.Visible); }
protected void ddlprovince_SelectedIndexChanged(object sender, Telerik.Web.UI.DropDownListEventArgs e) { ddlcity.Items.Clear(); //清空市下拉框项目 ddlcity.Items.Add(new DropDownListItem("请选择", "")); //给市下拉框添加请选择 XmlDataSource xds = new XmlDataSource(); //声明xml数据源 xds.DataFile = Server.MapPath("~/PatentProvince.xml"); //读取xml文件 xds.XPath = "//province[@name='" + ddlprovince.SelectedValue + "']/city"; //将路径存放在表达式中 ddlcity.DataSource = xds; //将xds赋值给数据源 ddlcity.DataTextField = "cname"; //设置文本字段 ddlcity.DataValueField = "cname"; //设置值字段 ddlcity.DataBind(); //绑定数据源 ddlcity.SelectedText = "请选择"; //设置初始值 }
protected void cityDropDownListS_ItemSelected(object sender, Telerik.Web.UI.DropDownListEventArgs e) { townDropDownListS.Items.Clear(); var selectedCityId = cityDropDownListS.SelectedValue; ///TODO: veritabanından çekilen veriye göre filtreleme yapılacak if (selectedCityId == "6") { townDropDownListS.Items.Add(new Telerik.Web.UI.DropDownListItem { Text = "İlçe #1", Value = "İlçe #1" }); } else { townDropDownListS.Items.Add(new Telerik.Web.UI.DropDownListItem { Text = "İlçe #2", Value = "İlçe #2" }); townDropDownListS.Items.Add(new Telerik.Web.UI.DropDownListItem { Text = "İlçe #3", Value = "İlçe #3" }); } }
protected void ChangeInsertType(object sender, Telerik.Web.UI.DropDownListEventArgs e) { bool IsBrochure = dd_type.SelectedItem.Text.Contains("Brochure"); int DivHeight = !IsBrochure ? 230 : 300; rcb_feature_search.Text = String.Empty; rcb_feature_search.SelectedValue = String.Empty; tr_bro_feature.Visible = IsBrochure; tr_issue.Visible = tr_mag_issue.Visible = !IsBrochure; btn_import.Visible = false; tr_preview.Visible = false; if (!IsBrochure && dd_magazine.Items.Count > 0 && dd_magazine.SelectedItem != null) { BindMagazineOrBrochurePreview(!IsBrochure); } div_main.Style.Add("height", DivHeight + "px"); Util.ResizeRadWindow(this); }
protected void cityDropDownListSM_ItemSelected(object sender, Telerik.Web.UI.DropDownListEventArgs e) { townDropDownListSM.Items.Clear(); var selectedCityId = cityDropDownListSM.SelectedValue; try { ServiceResult <List <TownDTO> > serviceResult = new ServiceResult <List <TownDTO> >(); var queryString = new Dictionary <string, string>(); var response = ApiHelper.CallGetApiMethod(ApiKeys.ParameterApiUrl, "GetTownList", queryString); if (!response.IsSuccessStatusCode) { throw new Exception("Hata oluştu!"); } var data = response.Content.ReadAsStringAsync().Result; serviceResult = JsonConvert.DeserializeObject <ServiceResult <List <TownDTO> > >(data); if (serviceResult.ServiceResultType == EnumServiceResultType.Success) { if (serviceResult.Result.Any()) { var filteredTownList = serviceResult.Result.Where(p => p.CityId == Convert.ToInt32(selectedCityId)).ToList(); foreach (var item in filteredTownList) { townDropDownListSM.Items.Add(new DropDownListItem { Text = item.Name, Value = item.Id.ToString() }); } } } } catch (Exception ex) { } }
protected void ddlCrew_SelectedIndexChanged(object sender, Telerik.Web.UI.DropDownListEventArgs e) { // txtfornam.Text = WebTools.GetExpr("WELDER_NO", "VIEW_CREW", " WHERE CREW_ID = " + ddlCrew.SelectedValue); }
protected void rDDPositionType_SelectedIndexChanged(object sender, Telerik.Web.UI.DropDownListEventArgs e) { hddPrimPosID.Value = rDDPositionType.SelectedValue; ucPlayerStats.BindChildStatsGrid(); }
protected void BindBuckets(object sender, Telerik.Web.UI.DropDownListEventArgs e) { LeadsUtil.BindBuckets(dd_projects, dd_buckets, hf_project_id.Value, true); }
protected void ddlMaterAccounts_SelectedIndexChanged(object sender, Telerik.Web.UI.DropDownListEventArgs e) { FillDevions(); }
protected void CustomersDDL_SelectedIndexChanged(object sender, Telerik.Web.UI.DropDownListEventArgs e) { CourseDDL.DataBind(); CurrentAchievements.DataBind(); }
protected void ddlFromSubcon_SelectedIndexChanged(object sender, Telerik.Web.UI.DropDownListEventArgs e) { string prefix = WebTools.GetExpr("JOB_CODE", "PROJECT_INFORMATION", " WHERE PROJECT_ID = '" + Session["PROJECT_ID"].ToString() + "'"); prefix += "-"; prefix += WebTools.GetExpr("SHORT_NAME", "SUB_CONTRACTOR", " WHERE SUB_CON_ID = '" + ddlFromSubcon.SelectedValue + "'"); prefix += "-SPL-TRANS-"; txtTransNo.Text = WebTools.NextSerialNo("PIP_SPL_TRANSFER", "TRANS_NO", prefix, 4, " WHERE FROM_SC = '" + ddlFromSubcon.SelectedValue + "'"); string sql_command = ""; if (ddlReason.SelectedIndex > 0) { var res_id = int.Parse(ddlReason.SelectedValue.ToString()); if (res_id == 4) { RowErectionOption.Visible = true; } else { RowErectionOption.Visible = false; } switch (res_id) { case 1: sql_command = "Select COAT_JC_NO AS JC_NO, JC_ID from PIP_COATING_JC WHERE FROM_SC='" + ddlFromSubcon.SelectedValue + "' AND SC_ID='" + ddlToSubcon.SelectedValue + "'"; sqlDocRef.SelectCommand = sql_command; txtDocNo.Visible = false; ddlDocNo.Visible = true; break; case 2: sql_command = "SELECT PNT_REQ_NO AS JC_NO, SPL_PNT_ID AS JC_ID FROM PIP_PAINTING_SPL"; sqlDocRef.SelectCommand = sql_command; txtDocNo.Visible = false; ddlDocNo.Visible = true; break; case 3: sql_command = "SELECT SER_NO AS JC_NO, TRANS_ID AS JC_ID FROM PIP_SPOOL_TRANS WHERE cat_id = 8 AND SC_ID='" + ddlFromSubcon.SelectedValue + "'"; sqlDocRef.SelectCommand = sql_command; txtDocNo.Visible = false; ddlDocNo.Visible = true; break; case 4: if (rdoErectionOption.SelectedValue.ToString().Equals("AT_SITE")) { sql_command = "SELECT rc.RCV_NO AS JC_NO FROM VIEW_SPOOL_RECEIVE rc WHERE rc.RCV_CAT_NAME='RECEIVE AT SITE'"; } else { sql_command = "SELECT rc.RCV_NO AS JC_NO FROM VIEW_SPOOL_RECEIVE rc WHERE rc.RCV_CAT_NAME='RECEIVE BY FIELD SUBCON'"; } sqlDocRef.SelectCommand = sql_command; txtDocNo.Visible = false; ddlDocNo.Visible = true; break; case 5: sql_command = "SELECT SER_NO AS JC_NO, TRANS_ID AS JC_ID FROM PIP_SPOOL_TRANS WHERE cat_id = 10 AND SC_ID=" + ddlFromSubcon.SelectedValue; sqlDocRef.SelectCommand = sql_command; txtDocNo.Visible = false; ddlDocNo.Visible = true; break; } } sqlDocRef.DataBind(); }
protected void ddlReason_SelectedIndexChanged(object sender, Telerik.Web.UI.DropDownListEventArgs e) { string sql_command = ""; if (ddlReason.SelectedIndex < 0) { return; } var res_id = int.Parse(ddlReason.SelectedValue.ToString()); if (res_id == 4) { RowErectionOption.Visible = true; } else { RowErectionOption.Visible = false; } switch (res_id) { case 1: sql_command = "Select COAT_JC_NO AS JC_NO, JC_ID from PIP_COATING_JC WHERE FROM_SC='" + ddlFromSubcon.SelectedValue + "' AND SC_ID='" + ddlToSubcon.SelectedValue + "'"; sqlDocRef.SelectCommand = sql_command; txtDocNo.Visible = false; ddlDocNo.Visible = true; break; case 2: sql_command = "SELECT PNT_REQ_NO AS JC_NO, SPL_PNT_ID AS JC_ID FROM PIP_PAINTING_SPL"; sqlDocRef.SelectCommand = sql_command; txtDocNo.Visible = false; ddlDocNo.Visible = true; break; case 3: sql_command = "SELECT SER_NO AS JC_NO, TRANS_ID AS JC_ID FROM PIP_SPOOL_TRANS WHERE cat_id = 8 AND SC_ID='" + ddlFromSubcon.SelectedValue + "'"; sqlDocRef.SelectCommand = sql_command; txtDocNo.Visible = false; ddlDocNo.Visible = true; break; case 4: if (rdoErectionOption.SelectedValue.ToString().Equals("AT_SITE")) { sql_command = "SELECT rc.RCV_NO AS JC_NO FROM VIEW_SPOOL_RECEIVE rc WHERE rc.RCV_CAT_NAME='RECEIVE AT SITE'"; } else { sql_command = "SELECT rc.RCV_NO AS JC_NO FROM VIEW_SPOOL_RECEIVE rc WHERE rc.RCV_CAT_NAME='RECEIVE BY FIELD SUBCON'"; } sqlDocRef.SelectCommand = sql_command; txtDocNo.Visible = false; ddlDocNo.Visible = true; break; case 5: sql_command = "SELECT SER_NO AS JC_NO, TRANS_ID AS JC_ID FROM PIP_SPOOL_TRANS WHERE cat_id = 10 AND SC_ID=" + ddlFromSubcon.SelectedValue; sqlDocRef.SelectCommand = sql_command; txtDocNo.Visible = false; ddlDocNo.Visible = true; break; case 6: txtDocNo.Visible = true; ddlDocNo.Visible = false; break; case 7: txtDocNo.Visible = true; ddlDocNo.Visible = false; break; } sqlDocRef.DataBind(); //Master.show_success("SQL_COMMAND AND res_id " + sql_command+" & "+ res_id); // txtAutoDocument.Re //txtAutoDocument.DataBind(); //Master.show_success(txtAutoDocument.Entries.Count.ToString()); }
protected void rDDSeason_SelectedIndexChanged(object sender, Telerik.Web.UI.DropDownListEventArgs e) { SetupListBoxes(); }
protected void universityDropDownListV_ItemSelected(object sender, Telerik.Web.UI.DropDownListEventArgs e) { var selectedUniversityId = Volunteer_University.SelectedValue; Init_DepartmentDropDownList(selectedUniversityId); }
protected void rDDSeason_SelectedIndexChanged(object sender, Telerik.Web.UI.DropDownListEventArgs e) { hddSeasonID.Value = rDDSeason.SelectedValue; ucPlayerStats.BindChildStatsGrid(); }
protected void ddlproject_SelectedIndexChanged(object sender, Telerik.Web.UI.DropDownListEventArgs e) { LoadProject_Information(); }
protected void rDDSeason_SelectedIndexChanged(object sender, Telerik.Web.UI.DropDownListEventArgs e) { LoadOtherTeam(); }
protected void ddlInstructionType_SelectedIndexChanged(object sender, Telerik.Web.UI.DropDownListEventArgs e) { BindData(); }
protected void BindMagazinePreview(object sender, Telerik.Web.UI.DropDownListEventArgs e) { BindMagazineOrBrochurePreview(true); }