protected void btnUpload_Click(object sender, EventArgs e) { if (!string.IsNullOrEmpty(fileUploadDrawing.FileName)) { string serverFilePath = string.Empty; Utility.UploadFile(fileUploadDrawing, "CustomerDrawing", SourceNo, ref serverFilePath); CustomerDrawing item = new CustomerDrawing() { CreatedAt = DateTime.Now, CreatedBy = SMSContext.Current.User.UserName, CustomerDrawing_Intro = txtCustomerDrawingIntro.Text, CustomerDrawing_Name = Utility.GetFileName(fileUploadDrawing), CustomerDrawing_Path = serverFilePath, SourceNo = SourceNo, SourceType = SourceType, }; CustomerDrawingDAL dal = new CustomerDrawingDAL(); dal.AddCustomerDrawing(item); dal.Save(); BindControl(); } SetFocus(sender); }
public override void BindControl() { CustomerDrawingDAL dal = new CustomerDrawingDAL(); Utility.BindDataToRepeater(rpCustomerDrawing, dal.GetCustomerDrawingBySource(SourceType, SourceNo)); }