예제 #1
0
 public static void LoadNextOrderPackageByReader(DataRow row, NextOrderPackage o)
 {
     o.WaiveID         = Convert.ToInt64(row["WaiveID"]);
     o.WaiveTitle      = row["WaiveTitle"].ToString();
     o.PackageID       = Convert.ToInt64(row["PackageID"]);
     o.PackageTitle    = row["PackageTitle"].ToString();
     o.Amount          = Convert.ToInt32(row["Amount"]);
     o.ProductionWeeks = Convert.ToInt32(row["ProductionWeeks"]);
     o.TheConfirmDate  = Convert.ToDateTime(row["TheConfirmDate"]);
 }
예제 #2
0
            public static NextOrderPackageCollection GetTopNextOrderPackagesOrdered(long CaseID, int Size)
            {
                NextOrderPackageCollection c = new NextOrderPackageCollection();

                SqlCommand             cmd    = new SqlCommand();
                SqlParameterCollection Params = cmd.Parameters;

                Params.Add(new SqlParameter("CaseID", CaseID));
                Params.Add(new SqlParameter("Size", Size));

                DataTable dt = Execute.FillDataTable(StoredProcedures.GetTopNextOrderPackagesOrdered, Params);

                if (dt.Rows.Count > 0)
                {
                    foreach (DataRow row in dt.Rows)
                    {
                        NextOrderPackage o = new NextOrderPackage();
                        LoadNextOrderPackageByReader(row, o);
                        c.Add(o);
                    }
                }
                return(c);
            }