欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

c#中list中消除,编辑按钮的操作 CC++C#UIWeb 

程序员文章站 2022-07-12 15:19:46
...
private void dlpartners_ItemCommand(object source, System.Web.UI.WebControls.RepeaterCommandEventArgs e)
		{
			string strsid = e.CommandArgument.ToString();
			if (e.CommandName == "detele")
			{
				if (m_handle.DoDelete(strsid))
				{
					Response.Redirect("./kounainyujou_shinseisho_ukeoi_add.aspx?mid="+strMid+"&seq="+strSeq);
				}
			}
			else if (e.CommandName == "uploadpic")
			{
				HttpPostedFile pFile = Request.Files[strsid];
				Hashtable shainmail_opa = new Hashtable();
				shainmail_opa["upPath"]="../"+clsAppSetting.GetAppSetting("config.xml","photo_upload_dir_name");
				shainmail_opa["type"]=".jpg";

				//フロア・座席略図
				HttpPostedFile pFloorImage = Request.Files["uploadfloorimage"];
				oData["upPath"]="../"+clsAppSetting.GetAppSetting("config.xml","pic_upload_dir_name");
				oData["type"]=".jpg";
				Hashtable oPic = m_handle.UploadFile(pFloorImage,oData);
				
				Hashtable oParamers = m_handle.UploadFile(pFile,shainmail_opa);
				oParamers["id"]=strsid;
				oData["management_id"] = strMid;
				if (m_handle.DoUploadpic(this,oParamers,oData,oPic))
				{
					Response.Redirect("./kounainyujou_shinseisho_ukeoi_add.aspx?mid="+strMid+"&seq="+strSeq);
				}
			}
			else if(e.CommandName == "update"){
				Response.Redirect("./kounainyujou_shinseisho_ukeoi_detail.aspx?mid="+strMid+"&seq="+strSeq+"&id="+strsid);
			}
		}
		private void dlpartners_ItemDataBound(object sender, System.Web.UI.WebControls.RepeaterItemEventArgs e)
		{
			if(e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)   
			{
				string strsid = ((DataRowView)e.Item.DataItem)["id"].ToString();
		
				LinkButton btnDelete = (LinkButton)e.Item.FindControl("btnDelete");
				btnDelete.Attributes.Add("OnClick","javascript:return confirm('削除致します。よろしいですか?');");
				btnDelete.CommandArgument = strsid;

				Button btnUploadPic = (Button)e.Item.FindControl("btnUploadPic");
				btnUploadPic.CommandArgument = strsid;

				LinkButton btnUpdate = (LinkButton)e.Item.FindControl("btnUpdate");
				btnUpdate.CommandArgument = strsid;
			}
		}





private void rptApply_ItemDataBound(object sender, System.Web.UI.WebControls.RepeaterItemEventArgs e)
		{
			if(e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)   
			{
				DataRowView oRowView = (DataRowView)e.Item.DataItem;
				string strDetailSeq = oRowView["seq"].ToString();

				HyperLink hlDetail = (HyperLink)e.Item.FindControl("hlDetail");
				HyperLink hlPreview = (HyperLink)e.Item.FindControl("hlPreview");
				hlPreview.Target = "_blank";

				hlDetail.NavigateUrl= "./it_kounainyujou_shinseisho_haken.aspx?seq=" + strDetailSeq;;
				hlPreview.NavigateUrl = "../preview/kounainyujou_shinseisho_haken.aspx?seq=" + strDetailSeq;
			}
		}