This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class WcfGen | |
{ | |
private static string contractName; | |
private static string operationName; | |
private static Type clientProxyType; | |
private static CodeDomProvider codeDomProvider; | |
private static CompilerResults results; | |
private static Uri mexAddress; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Messaging; | |
namespace MyProject | |
{ | |
/// <summary> | |
/// Provides a container class for the example. | |
/// </summary> | |
public class MyNewQueue |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var objCtx = ((System.Data.Entity.Infrastructure.IObjectContextAdapter)Context).ObjectContext; | |
objCtx.ExecuteStoreCommand("TRUNCATE TABLE [ServiceArgs]"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Context = new CSPRedemptionEntities(); | |
var List = from cp in Context.CouponPools | |
join cb in Context.CouponBatches | |
on new { CouponBatch_id = cp.CouponBatch_id } equals | |
new { CouponBatch_id = cb.id } | |
join m in Context.Members | |
on new { RedeempBy_id = cp.RedeemBy.Value } equals | |
new { RedeempBy_id = m.id} into MemberLeft | |
from x in MemberLeft.DefaultIfEmpty() | |
where cp.CouponBatch_id == CouponBatch_id && cp.Campaign_id == Campaign_id |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Records = context.Customers.Join(context.TransactionExchangeMoneys | |
, x => x.Cust_ID | |
, y => y.PayBy | |
, (x, y) => new { x, y }) | |
.Join(context.Products | |
, t=> t.y.ProductID | |
, p => p.ProductID | |
, (t,p) => new {t,p}) | |
.GroupBy(r => new { r.t.x.Cust_ID,r.t.x.UserNames ,r.t.x.EmailAddress_First,r.t.x.ShopName}) | |
.Select(g => new UserAndMoneyPaid |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
namespace CSP_PGP_Fileprocessor_util | |
{ | |
static class TypeSwitch | |
{ | |
public class CaseInfo { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Data; | |
using System.Linq; | |
using System.Collections; | |
using System.Collections.Specialized; | |
using System.Data.SqlClient; | |
using System.Windows.Forms; | |
using System.Collections.Generic; | |
using CSP_db_production_EntityDataAccess.Access; | |
using CSP_db_production_Utility.DataGridUtility; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public DataTable GetDelivery() | |
{ | |
try | |
{ | |
db_ProductionSystemEntities Context = this.GetContext(); | |
//var Records = Context.T_DELIVERY | |
// .Include("T_CUST_INFO") | |
// .Include("T_SHIPPING_COMPANY"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
new Switch(foo) | |
.Case<Fizz> | |
(action => { doingSomething = FirstMethodCall(); }) | |
.Case<Buzz> | |
(action => { return false; }) | |
public class Switch | |
{ | |
public Switch(Object o) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TypeSwitch.Do( | |
sender, | |
TypeSwitch.Case<Button>(() => textBox1.Text = "Hit a Button"), | |
TypeSwitch.Case<CheckBox>(x => textBox1.Text = "Checkbox is " + x.Checked), | |
TypeSwitch.Default(() => textBox1.Text = "Not sure what is hovered over")); | |
static class TypeSwitch { | |
public class CaseInfo { | |
public bool IsDefault { get; set; } | |
public Type Target { get; set; } |
NewerOlder