Beispiel #1
0
        public static void AddCorrection(Correction correction)
        {
            DataTable tbl;

            tbl = ds.Tables["Correction"];

            DataRow drNew;

            drNew = tbl.NewRow();

            drNew["ServiceTicketID"]  = lastAddedServiceTicketID;
            drNew["OrderID"]          = correction.OrderID;
            drNew["ProductCode"]      = correction.ProductCode;
            drNew["DateOfCorrection"] = correction.StartDateTimeOfOperation.ToShortDateString();

            tbl.Rows.Add(drNew);

            UpdateDB("Correction");
        }
Beispiel #2
0
        public override bool Equals(object obj)
        {
            if (obj != null)
            {
                if (!(obj is Correction))
                {
                    Correction correction = obj as Correction;

                    return((base.Equals(correction)) && (this.cost == correction.cost) && (this.serviceTicketID == correction.serviceTicketID));
                }
                else
                {
                    return(false);
                }
            }
            else
            {
                return(false);
            }
        }