Exemplo n.º 1
0
 public bool CreateRecord(Object contractobj)
 {
     Boolean flag = false;
     Contract contract = (Contract)contractobj;
     try
     {
     ClientContract _contract = new ClientContract();
     if (contract.ContactName != null)
     {
         _contract.ContactName = contract.ContactName.Trim();
     }
     if (contract.Description != null)
     {
         _contract.Description = contract.Description.Trim();
     }
     _contract.CreateBy = contract.CreateBy;
     _contract.CreateDate = DateTime.Now;
     if (_contract.ContactName != null)
     {
         flag = DAL.DALContract.CreateContarct(_contract);
     }
     }
     catch (Exception ex)
     {
     throw;
     }
     return flag;
 }
Exemplo n.º 2
0
 /// <summary>
 /// Create a new ClientContract object.
 /// </summary>
 /// <param name="contractID">Initial value of the ContractID property.</param>
 /// <param name="deleteStatus">Initial value of the DeleteStatus property.</param>
 public static ClientContract CreateClientContract(global::System.Int32 contractID, global::System.Int32 deleteStatus)
 {
     ClientContract clientContract = new ClientContract();
     clientContract.ContractID = contractID;
     clientContract.DeleteStatus = deleteStatus;
     return clientContract;
 }
Exemplo n.º 3
0
 /// <summary>
 /// Deprecated Method for adding a new object to the ClientContracts EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToClientContracts(ClientContract clientContract)
 {
     base.AddObject("ClientContracts", clientContract);
 }
Exemplo n.º 4
0
        public bool UpdateRecord(Object contractobj)
        {
            Boolean flag = false;
            Contract contract = (Contract)contractobj;
            try
            {
            ClientContract _contract = new ClientContract();
            _contract.ContractID = Convert.ToInt32(contract.ContractID);
            if (contract.ContactName!= null)
            {
                _contract.ContactName = contract.ContactName.Trim();
            }
            if (contract.Description != null)
            {
                _contract.Description = contract.Description.Trim();
            }

            _contract.ModifyBy = contract.modifyBy;
            _contract.ModifyDate = DateTime.Now;
            if (_contract.ContractID != null)
            {
                flag = DAL.DALContract.UpdateContract(_contract);
            }
            }
            catch (Exception ex)
            {
            throw;
            }
            return flag;
        }