protected void Page_Load(object sender, System.EventArgs e) { try{ myAPI = new API(Session["DBName"].ToString()); } catch{ onload = "alert('���n�J');top.location.href='../default.aspx';"; Response.End(); return; } }
protected void Page_Load(object sender, System.EventArgs e) { string id=""; myAPI = new API(Session["DBName"].ToString()); if(!IsPostBack) { if(Request.Params["txtID"]!=null) if(Request.Params["txtID"]=="1"){ id=getUID(); txtParentID.Text = id; } else txtParentID.Text = Request.Params["txtID"].ToString(); else Response.Redirect("./default.htm"); Button2.Attributes.Add("onclick","JavaScript:parent.leftFrame_reload();"); } }
protected void Page_Load(object sender, System.EventArgs e) { try{ myAPI = new API(Session["DBName"].ToString()); } catch{ onload = "alert('���n�J');top.location.href='./default.aspx';"; } if(!IsPostBack) { if(Request.Params["ID"]==null) Response.Redirect("./default.htm"); string ShowMode = Request.Params["ShowMode"]; txtName.Text = Request.Params["Name"]; txtID.Text = Request.Params["ID"]; txtParamters.Text = "?leafID=" + Request.Params["ID"] + "&leafSDate=" + Request.Params["aSDate"] + "&leafEDate=" + Request.Params["aEDate"] + "&leafName=" + Request.Params["Name"] + "&leafImg=" + Request.Params["NodeImg"]; this.Button1.Attributes.Add("onclick", "JavaScript:parent.leftFrame_reload();"); if(ShowMode!="0") Leaf_RedirectorGo(ShowMode); } }
protected void Page_Load(object sender, System.EventArgs e) { myAPI = new API(Session["DBName"].ToString()); if(!IsPostBack){ if(Request.Params["leafID"]==null) Response.Redirect("./welcome.aspx"); txtItemName.Text = Request.Params["leafName"]; txtItemImgName.Text = Request.Params["leafImg"]; if(Request.Params["leafImg"]!=""){ ItemImg.ImageUrl = "./LibraryMOD/Images/" + Request.Params["leafImg"]; ItemImg.Visible=true; } txtItemSDate.SetDateTimeValue(Request.Params["leafSDate"]); txtItemEDate.SetDateTimeValue(Request.Params["leafEDate"]); txtItemID.Text = Request.Params["leafID"]; string SelectCmd = "Select * from MediaListTemplate where ML_PID = " + Request.Params["leafID"]; SqlDataReader myDataReader = myAPI.Create_Rd(SelectCmd); if(myDataReader.Read()){ txtVideoID.Text = myDataReader["ML_UID"].ToString(); txtVideoName.Text = myDataReader["ML_Title"].ToString(); txtVideoImgName.Text = myDataReader["ML_Note1"].ToString(); if(myDataReader["ML_Note1"].ToString()!=""){ VideoImg.ImageUrl = "./LibraryMOD/Images/" + myDataReader["ML_Note1"].ToString(); VideoImg.Visible = true; } if(myDataReader["ML_OrderYN"].ToString()=="1") cbOrder.Checked=true; else cbOrder.Checked=false; txtVideoTime.Text = myDataReader["ML_Note2"].ToString(); if(myDataReader["ML_MediaStart"].ToString()!="" && myDataReader["ML_MediaEnd"].ToString()!=""){ VideoTimeStart = myDataReader["ML_MediaStart"].ToString(); VideoTimeEnd = myDataReader["ML_MediaEnd"].ToString(); txtVideoTimeStartHour.Text = VideoTimeStart.Substring(0,VideoTimeStart.IndexOf("h")); txtVideoTimeStartMin.Text = VideoTimeStart.Substring(VideoTimeStart.IndexOf("h")+1,VideoTimeStart.IndexOf("m")-VideoTimeStart.IndexOf("h")-1); txtVideoTimeStartSec.Text = VideoTimeStart.Substring(VideoTimeStart.IndexOf("n")+1,VideoTimeStart.IndexOf("s")-VideoTimeStart.IndexOf("n")-1); txtVideoTimeEndHour.Text = VideoTimeEnd.Substring(0,VideoTimeEnd.IndexOf("h")); txtVideoTimeEndMin.Text = VideoTimeEnd.Substring(VideoTimeEnd.IndexOf("h")+1,VideoTimeEnd.IndexOf("m")-VideoTimeEnd.IndexOf("h")-1); txtVideoTimeEndSec.Text = VideoTimeEnd.Substring(VideoTimeEnd.IndexOf("n")+1,VideoTimeEnd.IndexOf("s")-VideoTimeEnd.IndexOf("n")-1); } ChooseVideo.Text = myDataReader["ML_Content"].ToString(); txtDescription.Text = myDataReader["ML_Description"].ToString(); } else txtVideoID.Text="new"; btnUpdateItem.Attributes.Add("onclick", "JavaScript:parent.leftFrame_reload();"); btnDelItem.Attributes.Add("onclick", "JavaScript:parent.leftFrame_reload();"); btnUpdateVideo.Attributes.Add("onclick","JavaScript:parent.leftFrame_reload();"); string ShowArea = myAPI.SqlExeSca("SELECT [Cate_ShowArea] FROM [CategoryTemplate] WHERE [Cate_UID] = "+this.Request.Params["leafID"] ); this.rbShowArea1.SelectedIndex = 3-Int32.Parse(ShowArea); this.txtSort1.Text = myAPI.SqlExeSca("select [Cate_SortNum] FROM [CategoryTemplate] WHERE [Cate_UID] = "+this.Request.Params["leafID"] ); } }
protected void Page_Load(object sender, System.EventArgs e) { // �b�o�̩�m�ϥΪ̵{���X�H��l�ƺ�� string name; name = Session["UserID"].ToString(); videoPath += sever_ip+"\\WMPub\\WMRoot\\"+name; if(!IsPostBack) { PathLenth = videoPath.Length; //addList(); } try { myAPI = new API(Session["DBName"].ToString()); } catch { onload = "alert('�Х��n�J');top.location.href='../default.aspx';"; Response.End(); return; } }
private void InsertFile1(string di,string UserSN) { API myAPI = null; myAPI = new API("Smart-iTV_V2_5"); string WhereCmd1; string InsertCmd1 = "Insert into TreeTemplate(Tree_UID,Tree_Name,Tree_ParentUID,Tree_TypeOfNode,Tree_SortNum,PortalName,UserSN)"; //WhereCmd1 = "Values('112',N'" + di + "','416','3','1', 'P200000',N'" + UserSN + "')"; WhereCmd1 = "Values('112',N'" + di + "','416','3','1', 'P200000','1234')"; myAPI.Edit_Data(InsertCmd1 + WhereCmd1); }
protected void btnLogOn_Click(object sender, System.EventArgs e) { if (this.IsValid==true) { string userUserID=txtUserID.Text; string userPwd=txtUserPwd.Text; string userGroup=se.SelectedItem.Value;//??(clay)? MyTool.API myAPI = new MyTool.API("ndapn"); if ( userUserID != null) { //need check pwd DataTable dt0 = myAPI.GetUserPD(userUserID); if(dt0.Rows.Count==0) { ShowMsg("????"); se.Items.Clear(); se_GetPortalMapping();//??(clay)? return; } if (userPwd == dt0.Rows[0].ItemArray.GetValue(0).ToString() ) { //pwd correct if ( dt0.Rows[0].ItemArray.GetValue(1).ToString() == userGroup) { //string permission = userUserID; //devin 070424 "1"???? //Response.Cookies.Add(new System.Web.HttpCookie("UserID",userUserID)); Response.Cookies["UserID"].Value = userUserID; Session["UserID"] = userUserID; //string fxxk = Request.Cookies["UserID"].Value; Session["DBName"] = dt0.Rows[0].ItemArray.GetValue(2).ToString(); string s = Session["DBName"].ToString(); Session["userGroup"]=userGroup; Response.Redirect ("default.htm"); } else { // incorrect ShowMsg("????"); se.Items.Clear(); se_GetPortalMapping();//??(clay)? } } else { //pwd incorrect ShowMsg("????,?????"); se.Items.Clear(); se_GetPortalMapping();//??(clay)? } } else // not available user name { ShowMsg("????,?????"); se.Items.Clear(); se_GetPortalMapping();//??(clay)? } } }
//20081009??(clay)???? private void se_GetPortalMapping() { MyTool.API myAPI = new MyTool.API("ndapn"); string[] PortalMapping; string[] PortalName; PortalMapping = myAPI.GetPortalMapping().Split(','); PortalName = myAPI.GetPortalName().Split(','); for(int i=PortalMapping.GetLowerBound(0);i <= PortalMapping.GetUpperBound(0);i++) { if(PortalMapping[i]!="") { se.Items.Insert(0,new ListItem(PortalMapping[i],PortalName[i])); } } }
protected void Page_Load(object sender, System.EventArgs e) { try{ myAPI = new API(Session["DBName"].ToString()); } catch{ onload = "alert('½Ð¥ýµn¤J');top.location.href='./default.aspx';"; } if(!IsPostBack) { if(Request.Params["ID"]==null || Request.Params["TypeOfNode"]==null || Request.Params["Name"]==null || Request.Params["aSDate"]==null || Request.Params["aEDate"]==null){ Response.Redirect("./welcome.aspx"); }else{ if(Request.QueryString["TypeOfNode"].ToString()!="leaf"){ string nowDate = DateTime.Today.ToShortDateString(); txtStartDate.CalendarUrl = "./MyTool/Calendar.aspx"; txtEndDate.CalendarUrl = "./MyTool/Calendar.aspx"; txtID.Text = Request.QueryString["ID"].ToString(); txtFolderName.Text = Server.UrlDecode(Request.Params["Name"]).ToString(); txtStartDate.SetDateTimeValue(Request.Params["aSDate"].ToString()); txtEndDate.SetDateTimeValue(Request.Params["aEDate"].ToString()); txtImgName.Text = Request.Params["NodeImg"].ToString(); if(txtImgName.Text!="") imgFolder.ImageUrl = "../LibraryMOD/Images/" + txtImgName.Text.ToString(); else imgFolder.Visible=false; if(Request.Params["ShowMode"]=="2") rblistShowMode.Items[1].Selected=true; else rblistShowMode.Items[0].Selected=true; } } btnSend.Attributes.Add("onclick", "JavaScript:parent.leftFrame_reload();"); btnDel.Attributes.Add("onclick", "JavaScript:parent.leftFrame_reload();"); this.txtSort1.Text = myAPI.SqlExeSca("select [Cate_SortNum] FROM [CategoryTemplate] WHERE [Cate_UID] = "+txtID.Text ); } }