protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e) { xrisi(); VISA_Pistosi_Anal.DataBind(); Max_VISA.DataBind(); DropDownList18.DataBind(); if (DropDownList18.Items.Count == 0) { ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('Δεν υπάρχουν διαθέσιμες Βινιέτες !!!!');", true); DropDownList18.Enabled = false; Button2.Enabled = false; Button3.Enabled = false; Button4.Enabled = false; Button1.Enabled = false; } else { DropDownList18.Enabled = true; Button2.Enabled = true; Button4.Enabled = true; Button3.Enabled = true; Button1.Enabled = true; } }
protected void Page_Load(object sender, EventArgs e) { Max_VISA.DataBind(); DropDownList18.DataBind(); TextBox139.Text = Convert.ToInt16(Session["Visa_Ait_K"]).ToString(); TextBox140.Text = (string)Session["Visa_ID_K"]; Page.MaintainScrollPositionOnPostBack = true; if (TextBox8.Text.Length == 0) { TextBox8.Text = DateTime.Today.ToString("dd/MM/yyyy"); TextBox124.Text = DateTime.Today.ToString("dd/MM/yyyy"); } TextBox126.Text = User.Identity.Name; TextBox8.Attributes.Add("readonly", "readonly"); TextBox128.Text = FINANCIAL_MANAGEMENT.App_Code.xrisi.Fetch_Isotimia().ToString(); TextBox12.Text = DateTime.Parse(TextBox8.Text).Year.ToString(); TextBox11.Text = DateTime.Parse(TextBox8.Text).Month.ToString(); xrisi(); TextBox138.Text = "0"; txbRole.Text = FINANCIAL_MANAGEMENT.App_Code.xrisi.Fetch_Role(User.Identity.Name).ToString(); Session["Go_PrintVisa"] = "0"; if (TextBox139.Text == "101") { DropDownList1.SelectedValue = TextBox140.Text; DropDownList1.Enabled = false; //DropDownList18.Enabled = true; } else { DropDownList1.Enabled = true; // DropDownList18.Enabled = false; } }
protected void Timer1_Tick(object sender, EventArgs e) { DropDownList18.Items.Clear(); DropDownList18.DataBind(); if (TextBox134.Text.Length == 0) { TextBox134.Text = "0"; } if (DropDownList18.Items.Count > 0) { DropDownList18.SelectedIndex = Convert.ToInt16(TextBox134.Text); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { ArrayList arlist_temp1 = new ArrayList(); txtEstimateStartDate.SelectedDate = Convert.ToDateTime(DateTime.Now.AddDays(-2 / 24).ToString("yyyy/MM/dd")); arlist_temp1 = func.FileToArray(Server.MapPath(".") + "\\config\\hour.txt"); DropDownList5.DataSource = arlist_temp1; DropDownList5.DataBind(); DropDownList5.Text = DateTime.Now.AddHours(-6).ToString("HH"); arlist_temp1 = func.FileToArray(Server.MapPath(".") + "\\config\\min.txt"); DropDownList8.DataSource = arlist_temp1; DropDownList8.DataBind(); DropDownList8.Text = "30"; txtEstimateEndDate.SelectedDate = Convert.ToDateTime(DateTime.Now.AddDays(-2 / 24).ToString("yyyy/MM/dd")); arlist_temp1 = func.FileToArray(Server.MapPath(".") + "\\config\\hour.txt"); DropDownList15.DataSource = arlist_temp1; DropDownList15.DataBind(); DropDownList15.Text = DateTime.Now.AddHours(-1).ToString("HH"); arlist_temp1 = func.FileToArray(Server.MapPath(".") + "\\config\\min.txt"); DropDownList18.DataSource = arlist_temp1; DropDownList18.DataBind(); DropDownList18.Text = "29"; arlist_temp1 = func.FileToArray(Server.MapPath(".") + "\\config\\class.txt"); DropDownList1.DataSource = arlist_temp1; DropDownList1.DataBind(); //DropDownList1.Items.Insert(0, "請選擇"); bind_data(); } }
protected void Page_Load(object sender, EventArgs e) { int advisor_Id = 100, id = 100; string date = "4/16/2013"; string stID = "822459053"; lblAdvisorID.Text = advisor_Id.ToString(); lblDate.Text = date; lblStudentID.Text = stID; int time = 9; this.Util(100); DropDownList1.DataSource = getAdvisorIDs(); DropDownList1.DataBind(); Label2.Text = getAdvisorImage(advisor_Id); Label3.Text = getName(advisor_Id); Label4.Text = getDepartment(advisor_Id); // Label5.Text = getMonday(advisor_Id); // ////Label6.Text = getTuesday(advisor_Id); // ////Label7.Text = getWednesday(advisor_Id); // ////Label8.Text = getThursday(advisor_Id); // ////Label9.Text = getFriday(advisor_Id); DropDownList10.DataSource = getSlots(advisor_Id, date); DropDownList10.DataBind(); DropDownList11.DataSource = getTaken(advisor_Id, date); DropDownList11.DataBind(); DropDownList12.DataSource = getAvailability(getSlots(advisor_Id, date), getTaken(advisor_Id, date)); DropDownList12.DataBind(); DropDownList13.DataSource = getDaysAvailable(id); DropDownList13.DataBind(); // //Label14.Text = getAvailableID(time); Label15.Text = getCheck(stID).ToString(); DropDownList16.DataSource = getAdvisor2WeekSchedule(); DropDownList16.DataBind(); DropDownList17.DataSource = getAdvisor2WeekSchedule(id); DropDownList17.DataBind(); DropDownList18.DataSource = getStudentIds(); DropDownList18.DataBind(); }
protected void GridView13_RowDataBound(object sender, GridViewRowEventArgs e) { Max_VISA.DataBind(); DropDownList18.DataBind(); if (DropDownList18.Items.Count == 0) { ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('Δεν υπάρχουν διαθέσιμες Βινιέτες !!!!');", true); DropDownList18.Enabled = false; Button2.Enabled = false; Button3.Enabled = false; Button4.Enabled = false; Button1.Enabled = false; } else { DropDownList18.Enabled = true; Button2.Enabled = true; Button4.Enabled = true; Button3.Enabled = true; Button1.Enabled = true; } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { ArrayList arlist_temp1 = new ArrayList(); txtEstimateStartDate.SelectedDate = Convert.ToDateTime(DateTime.Now.AddDays(-7).ToString("yyyy/MM/dd")); arlist_temp1 = func.FileToArray(Server.MapPath(".") + "\\config\\hour.txt"); DropDownList5.DataSource = arlist_temp1; DropDownList5.DataBind(); DropDownList5.Text = DateTime.Now.ToString("HH"); arlist_temp1 = func.FileToArray(Server.MapPath(".") + "\\config\\min.txt"); DropDownList8.DataSource = arlist_temp1; DropDownList8.DataBind(); DropDownList8.Text = DateTime.Now.ToString("mm"); txtEstimateEndDate.SelectedDate = Convert.ToDateTime(DateTime.Now.AddDays(+0).ToString("yyyy/MM/dd")); arlist_temp1 = func.FileToArray(Server.MapPath(".") + "\\config\\hour.txt"); DropDownList15.DataSource = arlist_temp1; DropDownList15.DataBind(); DropDownList15.Text = DateTime.Now.ToString("HH"); arlist_temp1 = func.FileToArray(Server.MapPath(".") + "\\config\\min.txt"); DropDownList18.DataSource = arlist_temp1; DropDownList18.DataBind(); DropDownList18.Text = DateTime.Now.ToString("mm"); arlist_temp1 = func.FileToArray(Server.MapPath(".") + "\\config\\abnormal_type.txt"); DropDownList1.DataSource = arlist_temp1; DropDownList1.DataBind(); arlist_temp1 = func.FileToArray(Server.MapPath(".") + "\\config\\abnormal_area.txt"); DropDownList2.DataSource = arlist_temp1; DropDownList2.DataBind(); arlist_temp1 = func.FileToArray(Server.MapPath(".") + "\\config\\dep.txt"); DropDownList3.DataSource = arlist_temp1; DropDownList3.DataBind(); arlist_temp1 = func.FileToArray(Server.MapPath(".") + "\\config\\flag_type_query.txt"); DropDownList12.DataSource = arlist_temp1; DropDownList12.DataBind(); bind_data(); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { sql_str = " select distinct(t.offday) as offday from onduty t " + " where t.offday not in ('OFF','ON') "; ds_temp = func.get_dataSet_access(sql_str, conn); RadioButtonList1.DataSource = ds_temp.Tables[0]; RadioButtonList1.DataTextField = "offday"; RadioButtonList1.DataValueField = "offday"; RadioButtonList1.DataBind(); // RadioButtonList1.Items.Insert(0, "請選擇"); txtEstimateStartDate.SelectedDate = Convert.ToDateTime(DateTime.Now.AddDays(-1).ToString("yyyy/MM/dd")); arlist_temp1 = func.FileToArray(Server.MapPath(".") + "\\config\\hour.txt"); DropDownList5.DataSource = arlist_temp1; DropDownList5.DataBind(); DropDownList5.Text = DateTime.Now.ToString("HH"); DropDownList5.Text = "08"; arlist_temp1 = func.FileToArray(Server.MapPath(".") + "\\config\\min.txt"); DropDownList8.DataSource = arlist_temp1; DropDownList8.DataBind(); DropDownList8.Text = DateTime.Now.ToString("mm"); DropDownList8.Text = "00"; txtEstimateEndDate.SelectedDate = Convert.ToDateTime(DateTime.Now.AddDays(+0).ToString("yyyy/MM/dd")); arlist_temp1 = func.FileToArray(Server.MapPath(".") + "\\config\\hour.txt"); DropDownList15.DataSource = arlist_temp1; DropDownList15.DataBind(); DropDownList15.Text = DateTime.Now.ToString("HH"); arlist_temp1 = func.FileToArray(Server.MapPath(".") + "\\config\\min.txt"); DropDownList18.DataSource = arlist_temp1; DropDownList18.DataBind(); DropDownList18.Text = DateTime.Now.ToString("mm"); DropDownList18.Text = "59"; #region MyRegion 值班工程師 sql_str = " select distinct (t.engineer) as engineer " + " from onduty t " + " where t.engineer not in " + " ('何宗彥', '吳泳潔', '廖建賀', '張松騰', '徐展文', '林校平', '林豐裕', " + " '羅盛平', '胡慶祥', '邵朝文', '賴岳汶', '陳品辰', '陳盈仁', '魏武慶', " + " '黃建友', '黃紹煒','蔡丞','楊炎煌','蕭寶棋','蔡育倫','陳鏞企','吳宗哲','吳宜蓁','呂政達') "; // ds_temp.Clear(); ds_temp = func.get_dataSet_access(sql_str, conn); DropDownList4.DataSource = ds_temp.Tables[0]; DropDownList4.DataTextField = "engineer"; DropDownList4.DataValueField = "engineer"; DropDownList4.DataBind(); DropDownList4.Items.Insert(0, "請選擇"); #endregion #region fab sql_str = " select distinct (t.fab) as fab " + " from onduty t "; // ds_temp.Clear(); string [] fab_array = { "T0T1*", "T2*", "T0Array", "T1Array", "T0Cell", "T1Cell", "T1CF", "T2Array", "T2Cell", "T2CF", "T0T1_OTHERS", "T2_OTHERS", "C3", "WIS" }; ds_temp = func.get_dataSet_access(sql_str, conn); DropDownList1.DataSource = ds_temp.Tables[0]; DropDownList1.DataSource = fab_array; //DropDownList1.DataTextField = "fab"; //DropDownList1.DataValueField = "fab"; DropDownList1.DataBind(); DropDownList1.Items.Insert(0, "請選擇"); #endregion #region fab sql_str = " select distinct (t.system) as system " + " from onduty t "; // ds_temp.Clear(); ds_temp = func.get_dataSet_access(sql_str, conn); DropDownList2.DataSource = ds_temp.Tables[0]; DropDownList2.DataTextField = "system"; DropDownList2.DataValueField = "system"; DropDownList2.DataBind(); DropDownList2.Items.Insert(0, "請選擇"); #endregion #region close_flag sql_str = "select distinct(t.close_flag) as close_flag from onduty t" + " where t.close_flag is not null"; // ds_temp.Clear(); ds_temp = func.get_dataSet_access(sql_str, conn); DropDownList3.DataSource = ds_temp.Tables[0]; DropDownList3.DataTextField = "close_flag"; DropDownList3.DataValueField = "close_flag"; DropDownList3.DataBind(); DropDownList3.Items.Insert(0, "請選擇"); #endregion #region ars_flag sql_str = "select distinct(t.ars_flag) as ars_flag from onduty t" + " where t.ars_flag is not null"; // ds_temp.Clear(); ds_temp = func.get_dataSet_access(sql_str, conn); DropDownList12.DataSource = ds_temp.Tables[0]; DropDownList12.DataTextField = "ars_flag"; DropDownList12.DataValueField = "ars_flag"; DropDownList12.DataBind(); DropDownList12.Items.Insert(0, "請選擇"); #endregion #region alarm_flag sql_str = "select distinct(t.alarm_flag) as alarm_flag from onduty t" + " where t.alarm_flag is not null"; // ds_temp.Clear(); ds_temp = func.get_dataSet_access(sql_str, conn); DropDownList10.DataSource = ds_temp.Tables[0]; DropDownList10.DataTextField = "alarm_flag"; DropDownList10.DataValueField = "alarm_flag"; DropDownList10.DataBind(); DropDownList10.Items.Insert(0, "請選擇"); #endregion #region type sql_str = " select distinct(t.type) as type from onduty t " + " where t.type not in ('資料異常','MO+過帳失敗','交辦事項','支援部門','設備(搬運系統)','過帳失敗') "; // ds_temp.Clear(); ds_temp = func.get_dataSet_access(sql_str, conn); DropDownList6.DataSource = ds_temp.Tables[0]; DropDownList6.DataTextField = "type"; DropDownList6.DataValueField = "type"; DropDownList6.DataBind(); DropDownList6.Items.Insert(0, "請選擇"); #endregion #region product_impact sql_str = " select distinct(t.product_impact) as product_impact from onduty t " + " where t.product_impact is not null "; ds_temp = func.get_dataSet_access(sql_str, conn); DropDownList7.DataSource = ds_temp.Tables[0]; DropDownList7.DataTextField = "product_impact"; DropDownList7.DataValueField = "product_impact"; DropDownList7.DataBind(); DropDownList7.Items.Insert(0, "請選擇"); #endregion #region 處理者 sql_str = " select distinct(t.bywhom) as bywhom from onduty t " + " where t.bywhom is not null "; ds_temp = func.get_dataSet_access(sql_str, conn); DropDownList9.DataSource = ds_temp.Tables[0]; DropDownList9.DataTextField = "bywhom"; DropDownList9.DataValueField = "bywhom"; DropDownList9.DataBind(); DropDownList9.Items.Insert(0, "請選擇"); #endregion #region Assign To sql_str = " select distinct(t.assign_owner) as assign_owner from onduty t " + " where t.assign_owner not in ('何宗彥', '吳泳潔', '廖建賀', '張松騰', '徐展文', '林校平', '林豐裕', " + " '羅盛平', '胡慶祥', '邵朝文', '賴岳汶', '陳品辰', '陳盈仁', '魏武慶', " + " '黃建友', '黃紹煒','蔡丞','楊炎煌','蕭寶棋','蔡育倫','陳鏞企','吳宗哲','吳宜蓁','呂政達') "; ds_temp = func.get_dataSet_access(sql_str, conn); DropDownList11.DataSource = ds_temp.Tables[0]; DropDownList11.DataTextField = "assign_owner"; DropDownList11.DataValueField = "assign_owner"; DropDownList11.DataBind(); DropDownList11.Items.Insert(0, "請選擇"); DropDownList11.Items.Insert(1, "*"); #endregion Label1.Text = "0"; Label2.Text = "0"; Label3.Text = "0"; Label4.Text = "0"; Label5.Text = "0"; Label1.ForeColor = Color.Red; Label2.ForeColor = Color.Red; Label3.ForeColor = Color.Red; Label4.ForeColor = Color.Red; Label5.ForeColor = Color.Red; bind_data(); //MappTextProvider omapp = new MappTextProvider(); //omapp.SendMessage("12574", "值班紀錄被查詢發送測試"); } }
protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e) { TextBox12.Text = DateTime.Parse(TextBox8.Text).Year.ToString(); xrisi(); if (DropDownList1.SelectedValue == "6") { calEx1.StartDate = FINANCIAL_MANAGEMENT.App_Code.xrisi.VISA_Last_Date(); UpdateTimer.Enabled = false; TextBox132.Text = "6"; TextBox135.Text = "1"; TextBox136.Text = "VISA"; DropDownList2.Items.Clear(); DropDownList2.Items.Add(new ListItem("Κατηγορία ...", "0")); DropDownList2.DataSourceID = "ABE_Sub_Category"; DropDownList2.DataTextField = "ABE_Desc_S"; DropDownList2.DataValueField = "ABE_AA_S"; DropDownList2.DataBind(); DropDownList2.SelectedIndex = 0; DropDownList18.Visible = false; GridView1.DataSourceID = "ABE_Cost"; GridView6.DataSourceID = "ABE_Cost_LC"; Label1.Visible = false; GridView4.Visible = true; GridView9.Visible = false; Button1.Enabled = true; } else if (DropDownList1.SelectedValue == "8") { calEx1.StartDate = FINANCIAL_MANAGEMENT.App_Code.xrisi.FET_Last_Date(); UpdateTimer.Enabled = true; TextBox132.Text = "6"; TextBox135.Text = "2"; TextBox136.Text = "ΦΕΤ"; DropDownList2.Items.Clear(); DropDownList2.Items.Add(new ListItem("Κατηγορία ...", "0")); DropDownList2.DataSourceID = "ABE_Sub_Category"; DropDownList2.DataTextField = "ABE_Desc_S"; DropDownList2.DataValueField = "ABE_AA_S"; DropDownList2.DataBind(); DropDownList2.SelectedIndex = 0; GridView1.DataSourceID = "ABE_Cost"; GridView6.DataSourceID = "ABE_Cost_LC"; DropDownList18.Items.Clear(); DropDownList18.Items.Add(new ListItem("AA", "0")); DropDownList18.DataSourceID = "Max_FET"; DropDownList18.DataBind(); validate4.Enabled = true; DropDownList18.Visible = true; Label1.Text = "ΑΑ Φ.Ε.Τ."; Label1.Visible = true; GridView4.Visible = false; if (DropDownList18.Items.Count == 0) { ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('Δεν υπάρχουν διαθέσιμα ΦΕΤ !!!!');", true); DropDownList18.Enabled = false; Button2.Enabled = false; Button3.Enabled = false; Button1.Enabled = false; } else { DropDownList18.Enabled = true; Button2.Enabled = true; Button3.Enabled = false; Button1.Enabled = true; } } else if (DropDownList1.SelectedValue == "1000") { TextBox9.Text = "Θεωρήσεις από VFS"; DropDownList18.Enabled = false; DropDownList2.Enabled = false; Button2.Enabled = false; Button3.Enabled = false; Button1.Enabled = true; validate1.Enabled = false; validate2.Enabled = false; validate3.Enabled = false; validate4.Enabled = false; DropDownList18.Visible = false; Label1.Visible = false; GridView4.Visible = true; GridView9.Visible = false; } else { DropDownList2.Items.Clear(); } }