public ActionResult DeleteConfirmed(int id) { ep ep = db.ep.Find(id); db.ep.Remove(ep); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "Fecha,Dia,Mes,Codigo_ver,Vendedor,Producto,Nombre_Produc,Linea,Nombre_Linea,Cliente,Precio,cantidad")] ep ep) { if (ModelState.IsValid) { db.Entry(ep).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(ep)); }
// GET: eps/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } ep ep = db.ep.Find(id); if (ep == null) { return(HttpNotFound()); } return(View(ep)); }
public static b3 a(ep A_0) { if (!b.ContainsKey(A_0)) { return(null); } try { return((b3)b[A_0].GetType().GetConstructor(new Type[0]).Invoke(new object[0])); } catch { return(null); } }
VM = new ExtPersonVM(ep, VMGotFocus) { CustomLabel1 = customLabel(0), CustomLabel2 = customLabel(1), CustomLabel3 = customLabel(2), CustomLabel4 = customLabel(3), CustomLabel5 = customLabel(4) }; if (editMode) { VM.IsEditMode = true; } //hook up VM events VM.FocusBarClicked = () => { ChangeMode(Mode.Edit, false); VisualUtils.DelayThen(10, () => { VM.GetMainControl?.Invoke()?.Focus(); }); }; VM.LinkClicked = linkItemVM => { UIGlobals.Do.OpenBlockFromLink(linkItemVM.Link, linkItemVM.OtherId); }; //handle deferred behaviors if (UIGlobals.Deferred.OnNewPerson != null) { BoxToLinkOnSave = UIGlobals.Deferred.OnNewPerson.LinkedBoxId; UIGlobals.Deferred.OnNewPerson = null; } //edit mode only for new record VM.IsEditMode = editMode || ep.Person.RowId == 0; }
private static void a(ep A_0, b3 A_1) { b[A_0] = A_1; }
public void execute_sp() { if (recd[1] == 255) { switch (recd[0]) { case 250: { /* get the username n pass n auth by querying db */ int r = 1; if (r == 0) { } else if (r == 1) { res = new byte[2]; res[0] = 249; res[1] = 255; System.Text.ASCIIEncoding enc = new System.Text.ASCIIEncoding(); string t = enc.GetString(recd); t = t.Remove(0, 2).TrimEnd('\0'); string[] t_arr = t.Split(':'); user = t_arr[0]; ep e_tem = new ep(); e_tem.e = soc.RemoteEndPoint; e_tem.usr = user; ep_tab.Add(user, e_tem); } } break; case 247: { System.Text.ASCIIEncoding enc = new System.Text.ASCIIEncoding(); string t = enc.GetString(recd); t = t.Remove(0, 2).TrimEnd('\0'); user = t; BinaryReader binr_list; byte[] buf_list = new byte[100]; binr_list = new BinaryReader(File.Open("D:\\" + t + "\\list.txt", FileMode.Open)); int r_cnt = binr_list.Read(buf_list, 0, 100); binr_list.Close(); if (r_cnt == 0) { res = new byte[2]; res[0] = 246; res[1] = 255; } else { res = new byte[r_cnt + 2]; res = System.Text.Encoding.ASCII.GetBytes(" " + enc.GetString(buf_list)); res[0] = 245; res[1] = 255; } } break; case 244: { System.Text.ASCIIEncoding enc = new System.Text.ASCIIEncoding(); string t = enc.GetString(recd); t = t.Remove(0, 2); BinaryReader binr_list; byte[] buf_list = new byte[100000]; t = t.TrimEnd('\0'); binr_list = new BinaryReader(File.Open(@"D:\" + user + "\\" + t, FileMode.Open)); int r_cnt = binr_list.Read(buf_list, 2, 100000 - 2); binr_list.Close(); byte[] b = new byte[3]; b = intToByteArray1(r_cnt); byte[] bs = new byte[5]; bs[0] = 233; bs[1] = 255; bs[2] = b[0]; bs[3] = b[1]; bs[4] = b[2]; soc.Send(bs); res = new byte[r_cnt + 2]; for (int t_cnt = 2; t_cnt < r_cnt; t_cnt++) res[t_cnt] = buf_list[t_cnt]; res[0] = 243; res[1] = 255; } break; // control cha 242 n 241 reserved case 240: { System.Text.ASCIIEncoding enc = new System.Text.ASCIIEncoding(); byte[] len = new byte[3]; len[0] = recd[2]; len[1] = recd[3]; len[2] = recd[4]; int length = ((len[0] & 0xFF) << 16) + ((len[1] & 0xFF) << 8) + (len[2] & 0xFF); string t = enc.GetString(recd); t = t.Remove(0, 5); t = t.TrimEnd('\0'); int cnt = 0; byte[] to_wr = new byte[2000000]; while (cnt < length) { recd = new byte[1000000]; int c = soc.Receive(recd); // string t = enc.GetString(recd); // t.TrimEnd('\0'); for (int temp = 0; temp < c; temp++) to_wr[cnt + temp] = recd[temp]; cnt += c; } // user = "******"; BinaryWriter bin = new BinaryWriter(File.Open("D:\\" + t + "\\" + user + ".amr", FileMode.Create)); bin.Write(to_wr, 0, length); bin.Close(); bin = new BinaryWriter(File.Open("D:\\" + t + "\\list.txt", FileMode.Append)); string g = ":" + user + ".amr"; byte[] b_list = System.Text.Encoding.ASCII.GetBytes(g); bin.Write(b_list); bin.Close(); } break; case 239: { System.Text.ASCIIEncoding enc = new System.Text.ASCIIEncoding(); string t = enc.GetString(recd); t = t.Remove(0, 2); t = t.TrimEnd('\0'); // int pos = find(t); EndPoint rp = get_rep(t); if (rp == null) { // return negative code.. user not online.. } else { l.Add(rp); // some handshake bet sender n receiver reqd.. } } break; default: { if (l.Count > 0) forward(); } break; } } // recd = new byte[100]; }