private BDbcMethods(IntPtr pdbc, BDbOffsetOf offsetOf, BerkeleyDbType dbType) { _offsetOf = offsetOf; _dbType = dbType; foreach (BDbOffsetOfItem offsetOfItem in offsetOf.Dbc) { IntPtr funcptr = Marshal.ReadIntPtr(pdbc + offsetOfItem.Offset); switch (offsetOfItem.Name) { case "close": _close = (close)Marshal.GetDelegateForFunctionPointer(funcptr, typeof(close)); break; case "del": _del = (del)Marshal.GetDelegateForFunctionPointer(funcptr, typeof(del)); break; case "get": _get = (get)Marshal.GetDelegateForFunctionPointer(funcptr, typeof(get)); break; case "put": _put = (put)Marshal.GetDelegateForFunctionPointer(funcptr, typeof(put)); break; } } }
private BDbMethods(IntPtr pdb, BDbOffsetOf offsetOf, BerkeleyDbType dbType) { _dbType = dbType; _offsetOf = offsetOf; foreach (BDbOffsetOfItem offsetOfItem in offsetOf.Db) { IntPtr funcptr = Marshal.ReadIntPtr(pdb + offsetOfItem.Offset); switch (offsetOfItem.Name) { case "close": _close = (close)Marshal.GetDelegateForFunctionPointer(funcptr, typeof(close)); break; case "cursor": _cursor = (cursor)Marshal.GetDelegateForFunctionPointer(funcptr, typeof(cursor)); break; case "del": _del = (del)Marshal.GetDelegateForFunctionPointer(funcptr, typeof(del)); break; case "get_pagesize": _get_pagesize = (get_pagesize)Marshal.GetDelegateForFunctionPointer(funcptr, typeof(get_pagesize)); break; case "open": _open = (open)Marshal.GetDelegateForFunctionPointer(funcptr, typeof(open)); break; case "put": _put = (put)Marshal.GetDelegateForFunctionPointer(funcptr, typeof(put)); break; case "set_flags": _set_flags = (set_flags)Marshal.GetDelegateForFunctionPointer(funcptr, typeof(set_flags)); break; } } }
private void newClose() { close CloseSelft = newClose; if (this.InvokeRequired) { this.Invoke(CloseSelft); } else { this.Close(); this.Dispose(); } }
private void BeginProdution_FormClosing(object sender, FormClosingEventArgs e) { userEntity.dayTime = dayTimeT.Text; userEntity.total_time = workHoursT.Text; close close = new close(); close.ShowDialog(); if (close.DialogResult == DialogResult.OK) { System.Environment.Exit(0); } else { e.Cancel = true; } }
private BDbenvMethods(IntPtr pdbenv, BDbOffsetOfCollection offsetOfs) { foreach (BDbOffsetOfItem offsetOfItem in offsetOfs) { IntPtr funcptr = Marshal.ReadIntPtr(pdbenv + offsetOfItem.Offset); switch (offsetOfItem.Name) { case "close": _close = (close)Marshal.GetDelegateForFunctionPointer(funcptr, typeof(close)); break; case "open": _open = (open)Marshal.GetDelegateForFunctionPointer(funcptr, typeof(open)); break; } } }
public DataTable closerprt(close d) { SqlConnection conn = new SqlConnection(); conn.ConnectionString = ConfigurationManager.ConnectionStrings["btposdb"].ToString(); SqlCommand cmd = new SqlCommand(); cmd.CommandType = CommandType.StoredProcedure; cmd.CommandText = "HVInsUpdDelClosingReport"; cmd.Connection = conn; SqlParameter nn = new SqlParameter("@flag", SqlDbType.VarChar); nn.Value = d.flag; cmd.Parameters.Add(nn); SqlParameter n = new SqlParameter("@SlNo", SqlDbType.Int); n.Value = d.SlNo; cmd.Parameters.Add(n); SqlParameter r = new SqlParameter("@EntryDate", SqlDbType.Date); r.Value = d.EntryDate; cmd.Parameters.Add(r); SqlParameter a = new SqlParameter("@VechID", SqlDbType.Int); a.Value = d.VechID; cmd.Parameters.Add(a); SqlParameter s = new SqlParameter("@RegistrationNo", SqlDbType.NVarChar, 255); s.Value = d.RegistrationNo; cmd.Parameters.Add(s); SqlParameter f = new SqlParameter("@DriverName", SqlDbType.NVarChar, 255); f.Value = d.DriverName; cmd.Parameters.Add(f); SqlParameter j2 = new SqlParameter("@PartyName", SqlDbType.NVarChar, 255); j2.Value = d.PartyName; cmd.Parameters.Add(j2); SqlParameter g = new SqlParameter("@PickupPlace", SqlDbType.NVarChar, 255); g.Value = d.PickupPlace; cmd.Parameters.Add(g); SqlParameter h = new SqlParameter("@DropPlace", SqlDbType.NVarChar, 255); h.Value = d.DropPlace; cmd.Parameters.Add(h); SqlParameter j = new SqlParameter("@StartMeter", SqlDbType.Int); j.Value = d.StartMeter; cmd.Parameters.Add(j); SqlParameter k = new SqlParameter("@EndMeter", SqlDbType.Int); k.Value = d.EndMeter; cmd.Parameters.Add(k); SqlParameter y = new SqlParameter("@OtherExp", SqlDbType.Int); y.Value = d.OtherExp; cmd.Parameters.Add(y); SqlParameter rj = new SqlParameter("@GeneratedAmount", SqlDbType.Int); rj.Value = d.GeneratedAmount; cmd.Parameters.Add(rj); SqlParameter t = new SqlParameter("@ActualAmount", SqlDbType.Int); t.Value = d.ActualAmount; cmd.Parameters.Add(t); SqlParameter u = new SqlParameter("@ExecutiveName", SqlDbType.NVarChar, 255); u.Value = d.ExecutiveName; cmd.Parameters.Add(u); SqlParameter o = new SqlParameter("@BNo", SqlDbType.Decimal); o.Value = d.BNo; cmd.Parameters.Add(o); SqlParameter p = new SqlParameter("@DropTime", SqlDbType.DateTime); p.Value = d.DropTime; cmd.Parameters.Add(p); SqlParameter w = new SqlParameter("@PickupTime", SqlDbType.DateTime); w.Value = d.PickupTime; cmd.Parameters.Add(w); SqlParameter ws = new SqlParameter("@EntryTime", SqlDbType.DateTime); ws.Value = d.EntryTime; cmd.Parameters.Add(ws); DataTable dt = new DataTable(); SqlDataAdapter da = new SqlDataAdapter(cmd); da.Fill(dt); return(dt); }