public ActionResult ShareFile(int fileId, int friendId) { FileSharingService.Create(new BllSharedFile() { FileId = fileId, OwnerId = User.Id, RecipientId = friendId }); return(View(User.Friends)); }
protected void Button1_Click(object sender, EventArgs e) { FileSharingService fileSharingService = new FileSharingService(); string clientIp = (Request.ServerVariables["HTTP_X_FORWARDED_FOR"] ?? Request.ServerVariables["REMOTE_ADDR"]).Split(',')[0].Trim(); string[] serviceResult = fileSharingService.CreateSharing(oFile, clientIp, PasswordBox.Text, TextBox1, TextBox2); lblUploadResult.Text = serviceResult[0]; if (serviceResult[1] != "") { ReadLogfile(serviceResult[1]); } }