Ejemplo n.º 1
0
        protected void AddSarfButton_Click(object sender, EventArgs e)
        {
            var dataSource = NewDataSource();
            //var systemSettings = new Sys
            var currentAccount = new UserAccountLogic(CurrentUser, dataSource);
            var user = currentAccount.GetUserByID(CurrentUser.UserID);
            SARF sarfObj = new SARF();

            //sarfObj.SARFCode
            sarfObj.DateFiled = SarfControl.dateFiledDatePicker.SelectedDate.Value;
            sarfObj.DateOfVisit = SarfControl.dateOfVisitDatePicker.SelectedDate.Value;
            sarfObj.FiledBy = user.ID;
            sarfObj.Purpose = SarfControl.purposeTextBox.Text;
            sarfObj.SourceIP =
                Request.ServerVariables["REMOTE_ADDR"] ?? Request.ServerVariables["HTTP_X_FORWARDED_FOR"];
            sarfObj.Status = SarfControl.statusTextBox.Text;
            sarfObj.DateVisited = SarfControl.dateVisitedDatePicker.SelectedDate.Value;
            sarfObj.VisitVerifiedBy = 0;
            sarfObj.IsActive = true;
            sarfObj.UserCreated = user.ID;
            sarfObj.DateCreated = DateTime.Now;

            var sarfEntry = new SarfLogic(CurrentUser, dataSource);
            sarfEntry.AddSarf(sarfObj);
        }
Ejemplo n.º 2
0
        public void DeleteSarf(SARF sarf)
        {
            if (Equals(sarf, null))
                throw new ArgumentNullException("SARF");

            DataSession.DeleteSarf(sarf);
        }
Ejemplo n.º 3
0
 public void AddSarf(SARF sarf)
 {
     DataSession.AddSarf(sarf);
 }
Ejemplo n.º 4
0
 private void detach_SARF_VerifiedBy(SARF entity)
 {
     this.SendPropertyChanging();
     entity.VisitVerifiedByUserAccount = null;
 }
Ejemplo n.º 5
0
 private void detach_SARF_FiledBy(SARF entity)
 {
     this.SendPropertyChanging();
     entity.FiledByUserAccount = null;
 }
Ejemplo n.º 6
0
 private void attach_SARF(SARF entity)
 {
     this.SendPropertyChanging();
     entity.UserAccount = this;
 }
Ejemplo n.º 7
0
partial         void UpdateSARF(SARF instance);
Ejemplo n.º 8
0
partial         void InsertSARF(SARF instance);
Ejemplo n.º 9
0
partial         void DeleteSARF(SARF instance);
Ejemplo n.º 10
0
 public void DeleteSarf(SARF sarf)
 {
     DataContext.SARF.DeleteOnSubmit(sarf);
 }
Ejemplo n.º 11
0
 public void AddSarf(SARF sarf)
 {
     DataContext.SARF.InsertOnSubmit(sarf);
 }