Exemple #1
0
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }

            ContractConfigurations cc = obj as ContractConfigurations;

            if ((object)cc == null)
            {
                return(false);
            }
            return((this.ContractConfigurations_Contract == cc.ContractConfigurations_Contract) && (this.ContractConfigurations_Configuration == cc.ContractConfigurations_Configuration) && (this.CompSerial == cc.CompSerial));
        }
Exemple #2
0
        public List <ContractConfigurations> GetContractConfigurations()
        {
            Datahandler dh = Datahandler.getData();
            List <ContractConfigurations> contractConf = new List <ContractConfigurations>();
            DataTable table = dh.readDataFromDB(DataAccesHelper.QueryGetContractConfiguration + this.ContractConfigurations_Contract.ContractIdentifier + "'");

            foreach (DataRow item in table.Rows)
            {
                ContractConfigurations cf = new ContractConfigurations();
                cf.ContractConfigurations_Contract = new Contract();
                cf.ContractConfigurations_Contract.ContractIdentifier = item[DataAccesHelper.ccContractId].ToString();
                cf.ContractConfigurations_Configuration = new Configurations(item[DataAccesHelper.ccConfId].ToString(), item[DataAccesHelper.confName].ToString(), item[DataAccesHelper.confDesc].ToString(), new SystemComponents(item[DataAccesHelper.confCompCode].ToString(), null, "", "", "", ""), Convert.ToDouble(item[DataAccesHelper.confAddCost].ToString()), item[DataAccesHelper.confStatus].ToString());
                cf.CompSerial = item[DataAccesHelper.ccCompSerial].ToString();
                contractConf.Add(cf);
            }

            return(contractConf);
        }