/// <summary> /// Deprecated Method for adding a new object to the cat_mo EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddTocat_mo(cat_mo cat_mo) { base.AddObject("cat_mo", cat_mo); }
/// <summary> /// Create a new cat_mo 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 Createcat_mo(global::System.String so_dt, global::System.Decimal id) { cat_mo cat_mo = new cat_mo(); cat_mo.so_dt = so_dt; cat_mo.id = id; return cat_mo; }
void LoadOp_Complete(LoadOperation<cat_mo> lo) { if (lo.Entities.Count() > 0) { MessageBox.Show("Thuê bao này đã yêu cầu rồi ! đang chờ mở !"); } else { cat_mo cm = new cat_mo { so_dt = txtsdt.Text, ten_dkdb = txttentb.Text.Trim(), ten_dktb = txttendb.Text.Trim(), dc_tbld = txtdcld.Text.Trim(), dia_chitb = txtdctb.Text.Trim(), dlu = txtdlu.Text.Trim() == "" ? 0 : Convert.ToInt32(txtdlu.Text.Trim()), en = txten.Text.Trim() == "" ? 0 : Convert.ToInt32(txten.Text.Trim()), frame = txtframe.Text.Trim() == "" ? 0 : Convert.ToInt32(txtframe.Text.Trim()), port = txtport.Text.Trim() == "" ? 0 : Convert.ToInt32(txtport.Text.Trim()), shell = txtshelf.Text.Trim() == "" ? 0 : Convert.ToInt32(txtshelf.Text.Trim()), slot = txtslot.Text.Trim() == "" ? 0 : Convert.ToInt32(txtslot.Text.Trim()), slp = txtslp.Text.Trim() == "" ? 0 : Convert.ToInt32(txtslp.Text.Trim()), card = txtmod.Text.Trim() == "" ? 0 : Convert.ToInt32(txtmod.Text.Trim()), logic = false, ma_huyen = App.ma_huyen, ma_yc = cmbloai.GetKeyValue(cmbloai.SelectedIndex).ToString(), mo = rdomo.IsChecked == true ? false : true, nguoi_yc = App.User_name, tg_yc = App.Current_d }; dstb.cat_mos.Add(cm); dstb.SubmitChanges(OnSubmitCompleted, true); } }