Example #1
0
 private void AddNewRecord()
 {
     BLL.News objData = new BLL.News();
     objData.AddNew();
     objData.EnTitle = uiTextBoxEnTitle.Text;
     objData.ArTitle = uiTextBoxArTitle.Text;
     objData.EnBody = Server.HtmlEncode(uiFCKeditorEnBody.Value);
     objData.ArBody = Server.HtmlEncode(uiFCKeditorArBody.Value);
     //objData.CategoryID = Convert.ToInt32(uiDropDownListCategory.SelectedValue);
     objData.EnBrief = uiTextBoxEnBreif.Text;
     objData.ArBrief = uiTextBoxArBrief.Text;
     if (uiFileUploadMainPicturePath.HasFile)
     {
         uiFileUploadMainPicturePath.SaveAs(Server.MapPath("~/FileUploads/News/" + uiFileUploadMainPicturePath.FileName));
         objData.MainPicturePath = "/FileUploads/News/" + uiFileUploadMainPicturePath.FileName;
     }
     objData.CreatedDate = DateTime.Now.AddHours(7);
     objData.Save();
 }