Esempio n. 1
0
 /// <summary>
 /// Create a new cat_mo_log object.
 /// </summary>
 /// <param name="so_dt">Initial value of the so_dt property.</param>
 /// <param name="id">Initial value of the id property.</param>
 public static cat_mo_log Createcat_mo_log(global::System.String so_dt, global::System.Decimal id)
 {
     cat_mo_log cat_mo_log = new cat_mo_log();
     cat_mo_log.so_dt = so_dt;
     cat_mo_log.id = id;
     return cat_mo_log;
 }
Esempio n. 2
0
 private void OKButton_Click(object sender, RoutedEventArgs e)
 {
     FunAndPro callF = new FunAndPro();
     callF.GetDateTime();
     string m_sdt,m_mayc;
     for (int i = 0; i < gridControl1.VisibleRowCount; i++)
     {                
         if (Convert.ToBoolean(gridControl1.GetCellValue(i, check)) ==true)
         {
             m_sdt=gridControl1.GetCellValue(i, sodt).ToString().Trim();
             m_mayc=gridControl1.GetCellValue(i, ma_yc).ToString().Trim();
             for (int j = 0; j < LoadOpR.Entities.Count(); j++)
             {
                 if (LoadOpR.Entities.ElementAt(j).so_dt.Trim() == m_sdt && LoadOpR.Entities.ElementAt(j).ma_yc.Trim() == m_mayc)
                 {
                     cat_mo_log cml = new cat_mo_log
                     {
                         card = LoadOpR.Entities.ElementAt(j).card,
                         dc_tbld = LoadOpR.Entities.ElementAt(j).dc_tbld,
                         dia_chitb = LoadOpR.Entities.ElementAt(j).dia_chitb,
                         dlu = LoadOpR.Entities.ElementAt(j).dlu,
                         en = LoadOpR.Entities.ElementAt(j).en,
                         frame = LoadOpR.Entities.ElementAt(j).frame,
                         logic = true,
                         ma_huyen = LoadOpR.Entities.ElementAt(j).ma_huyen,
                         ma_yc = LoadOpR.Entities.ElementAt(j).ma_yc,
                         mo = LoadOpR.Entities.ElementAt(j).mo,
                         nguoi_mo = App.User_name,
                         nguoi_yc = LoadOpR.Entities.ElementAt(j).nguoi_yc,
                         port = LoadOpR.Entities.ElementAt(j).port,
                         shell = LoadOpR.Entities.ElementAt(j).shell,
                         slot = LoadOpR.Entities.ElementAt(j).slot,
                         slp = LoadOpR.Entities.ElementAt(j).slp,
                         so_dt = LoadOpR.Entities.ElementAt(j).so_dt,
                         ten_dkdb = LoadOpR.Entities.ElementAt(j).ten_dkdb,
                         ten_dktb = LoadOpR.Entities.ElementAt(j).ten_dktb,
                         tg_mo = App.Current_d,
                         tg_yc = LoadOpR.Entities.ElementAt(j).tg_yc
                     };
                     dstb.cat_mo_logs.Add(cml); 
                     cat_mo cm = LoadOpR.Entities.ElementAt(j);
                     dstb.cat_mos.Remove(cm);
                 }
             }                  
         }                             
     }
     dstb.SubmitChanges(OnSubmitCompleted, true);
 }
Esempio n. 3
0
 /// <summary>
 /// Deprecated Method for adding a new object to the cat_mo_log EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddTocat_mo_log(cat_mo_log cat_mo_log)
 {
     base.AddObject("cat_mo_log", cat_mo_log);
 }