コード例 #1
0
ファイル: EditSetup.aspx.cs プロジェクト: alexan1/marketweb
		private void btnSubmit_ServerClick(object sender,EventArgs e)
		{
			BPSetup bp = new BPSetup();
			BESetup.tbl_SetupRow category;
			dsSetup = new BESetup();

			// Edit a Product Category
			dsSetup = bp.SelectAll();
			if(SetupID == 0)
			{
				category = dsSetup.tbl_Setup.Newtbl_SetupRow();
			}
			else
			{
				category = dsSetup.tbl_Setup.FindBySetupID(SetupID);				
			}
			//all content to be updated/inserted between here
			category.SetupEmailAddress1 = txtEmail1.Text;
			category.SetupEmailAddress2 = txtEmail2.Text;
			category.SetupEmailServer = txtEmailServer.Text;

			category.DateModified = DateTime.Now;
			category.ModifiedByAdminID = Convert.ToInt32(OryxUser.OryxIdentity.MemberID);
			//all content to be updated/inserted between here			
			if(SetupID == 0)
			{
				category.DateCreated = DateTime.Now;
				dsSetup.tbl_Setup.Addtbl_SetupRow(category);
			}
			bp.Update(dsSetup);

			Response.Redirect("Index.aspx");
		}