本文整理汇总了C#中Attendance.BAL.Report.UpdateUser方法的典型用法代码示例。如果您正苦于以下问题:C# Report.UpdateUser方法的具体用法?C# Report.UpdateUser怎么用?C# Report.UpdateUser使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Attendance.BAL.Report
的用法示例。
在下文中一共展示了Report.UpdateUser方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: btnUpdate_Click
//.........这里部分代码省略.........
System.IO.Directory.CreateDirectory(SaveFileLoc);
}
string FileNameSaveData = SaveFileLoc + (objInfo.Firstname.Trim() + objInfo.Lastname.Trim()).Trim() + ".jpeg";
PhotoLink = (objInfo.Firstname.Trim() + objInfo.Lastname.Trim()).Trim() + ".jpeg";
photoUpload1.SaveAs(FileNameSaveData);
Bitmap oBitmap = default(Bitmap);
oBitmap = new Bitmap(FileNameSaveData);
Graphics oGraphic = default(Graphics);
int newwidthimg = 140;
// Here create a new bitmap object of the same height and width of the image.
// float AspectRatio = (float)oBitmap.Size.Width / (float)oBitmap.Size.Height;
int newHeight = 140;
Bitmap bmpNew = new Bitmap(newwidthimg, newHeight);
oGraphic = Graphics.FromImage(bmpNew);
oGraphic.CompositingQuality = CompositingQuality.HighQuality;
oGraphic.SmoothingMode = SmoothingMode.HighQuality;
oGraphic.InterpolationMode = InterpolationMode.HighQualityBicubic;
oGraphic.DrawImage(oBitmap, new Rectangle(0, 0, bmpNew.Width, bmpNew.Height), 0, 0, oBitmap.Width, oBitmap.Height, GraphicsUnit.Pixel);
// Release the lock on the image file. Of course,
// image from the image file is existing in Graphics object
oBitmap.Dispose();
oBitmap = bmpNew;
//SolidBrush oBrush = new SolidBrush(Color.Black);
//Font ofont = new Font("Arial", 8);
//oGraphic.DrawString("Some text to write", ofont, oBrush, 10, 10);
//oGraphic.Dispose();
//ofont.Dispose();
//oBrush.Dispose();
oBitmap.Save(FileNameSaveData, ImageFormat.Jpeg);
oBitmap.Dispose();
}
}
}
catch (Exception ex)
{
System.Web.UI.ScriptManager.RegisterClientScriptBlock(Page, typeof(Page), "Script", "alert('File access denied');", true);
}
//objInfo.Lastname = GeneralFunction.ToProper(txtEditLastname.Text.Trim());
objInfo.ScheduleID = Convert.ToInt32(ddlSchedule.SelectedItem.Value);
objInfo.EmpTypeID = Convert.ToInt32(ddlEmpType.SelectedItem.Value);
objInfo.Deptname = ddlEditDepart.SelectedItem.Text.ToString();
objInfo.Designation = GeneralFunction.ToProper(txtEditDesg.Text.Trim());
objInfo.StartDt = txtEditStartDate.Text == "" ? Convert.ToDateTime("01/01/1900") : Convert.ToDateTime(txtEditStartDate.Text);
objInfo.TermDt = txtEditTermDate.Text == "" ? Convert.ToDateTime("01/01/1900") : Convert.ToDateTime(txtEditTermDate.Text);
objInfo.TermReason = txtEdit1TermReason.Text.Trim();
if (rdEditActiveFalse.Checked == true)
{
objInfo.IsActive = false;
}
else
{
objInfo.IsActive = true;
objInfo.TermDt = Convert.ToDateTime("01/01/1900");
objInfo.TermReason = "";
}
Attendance.BAL.Report obj = new Report();
String strHostName = Request.UserHostAddress.ToString();
string strIp = System.Net.Dns.GetHostAddresses(strHostName).GetValue(0).ToString();
bool bnew = obj.UpdateUser(objInfo, EmployeeID, UserID, PhotoLink, strIp);
if (bnew)
{
btnUpdate.Enabled = true;
btnEditCancel.Enabled = true;
mdlEditPopup.Hide();
txtEdit1TermReason.Text = "";
txtEditTermDate.Text = "";
txtEditDesg.Text = "";
txtEditEmpID.Text = "";
txtEditFirstname.Text = "";
txtEditLastname.Text = "";
txtEditStartDate.Text = "";
ddlEditDepart.SelectedIndex = 0;
ddlEmpType.SelectedIndex = 0;
ddlSchedule.SelectedIndex = 0;
GetEmpDet(EmployeeID);
}
}
catch (Exception ex)
{
}
}