示例#1
0
 private void Save_pi()
 {
     foreach (tbl_000_H_PI p in pilist)
     {
         p.YEARUSED    = UserSettings.LogInYear;
         p.IsLocked    = false;
         p.CreatedDate = DateTime.Now;
         p.CreatedBy   = UserSettings.Username;
         p.UpdatedDate = DateTime.Now;
         p.IsCopied    = false;
         p.CopyDate    = DateTime.Now;
         p.IsImported  = true;
         p.ImportDate  = DateTime.Now;
         p.ImportBy    = UserSettings.Username;
         cleaned_list_pi.Add(p);
     }
     if (pibal.Save_List(cleaned_list_pi))
     {
         if (cleaned_list_pi.Count > 0)
         {
             finishing_msg = msgval_success;
         }
         else
         {
             finishing_msg = msgval_nochanges;
         }
         MessageHelpers.ShowInfo(finishing_msg);
         MyCaller_mtpi.Init_Form();
     }
 }
 private void Save_pi(Boolean IsOverwrite)
 {
     if (pibal.CopyByYear(selyear, UserSettings.LogInYear, UserSettings.Username, IsOverwrite))
     {
         MessageHelpers.ShowInfo(msgval_success);
         MyCaller_mtpi.Init_Form();
     }
 }