예제 #1
0
        protected void btnSubmit_Click(Object Sender, EventArgs e)
        {
            // Copy to remote system
            int     intWorkstation = Int32.Parse(Request.QueryString["id"]);
            DataSet dsAccounts     = oWorkstation.GetAccountsVirtual(intAsset);

            foreach (DataRow drAccount in dsAccounts.Tables[0].Rows)
            {
                oRemote.AddRemoteAccount(lblWorkstation.Text, oUser.GetName(Int32.Parse(drAccount["userid"].ToString())), Int32.Parse(drAccount["admin"].ToString()), Int32.Parse(drAccount["remote"].ToString()));
                oWorkstation.UpdateAccount(Int32.Parse(drAccount["id"].ToString()));
            }
            oOnDemand.UpdateStepDoneWorkstation(intWorkstation, intStep, "Accounts were configured", 0, false, false);
            oWorkstation.NextVirtualStep(intWorkstation);
            oRemote.NextRemoteVirtual(intRemote);
            // Close Window and Update Parent Screen
            Page.ClientScript.RegisterClientScriptBlock(typeof(Page), "reload", "<script type=\"text/javascript\">window.opener.location.reload();window.close();<" + "/" + "script>");
        }