private void AddNewItems()
    {
        ChargeCode code = new ChargeCode();
        code.Ebay_Code = txtEbayCode.Value;
        code.Charge_Code_Name = txtChargeCode.Value;
        code.User_Code = int.Parse(ddlUser.SelectedValue);
        code.Created_By = UserKey;
        code.Created_Date = DateTime.Now;
        code.Is_Active = true;
        code.User_IP = Request.UserHostAddress;

        DataModelEntities entities = new DataModelEntities();
        entities.ChargeCodes.AddObject(code);
        entities.SaveChanges();

        BindCodes();
    }
 /// <summary>
 /// Deprecated Method for adding a new object to the ChargeCodes EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToChargeCodes(ChargeCode chargeCode)
 {
     base.AddObject("ChargeCodes", chargeCode);
 }
 /// <summary>
 /// Create a new ChargeCode object.
 /// </summary>
 /// <param name="charge_Code">Initial value of the Charge_Code property.</param>
 public static ChargeCode CreateChargeCode(global::System.Int32 charge_Code)
 {
     ChargeCode chargeCode = new ChargeCode();
     chargeCode.Charge_Code = charge_Code;
     return chargeCode;
 }