예제 #1
0
 /// <summary>
 /// Metoda přidá novou zakázku.
 /// </summary>
 /// <param name="name">Jméno zakázky</param>
 /// <param name="submitter">Jméno zákazníka</param>
 /// <param name="pieces">Počet kusů</param>
 /// <param name="reward">Odměna za provedenou práci</param>
 /// <param name="material">Typ materiálu</param>
 public void AddContract(string name, string submitter, int pieces, int reward, Contract.KindMaterial material)
 {
     ContractCollection.Add(new Contract(name, submitter, pieces, reward, material));
     // Aktualizace OverviewFactory
     RefreshOverviewFactory();
     Save();
 }
예제 #2
0
파일: Contract.cs 프로젝트: juinti/juinti
            public static ContractCollection GetContractsByCaseID(Int64 CaseID)
            {
                ContractCollection c = new ContractCollection();

                DataTable dt = Execute.FillDataTable(StoredProcedures.GetContractsByCaseID, new System.Data.SqlClient.SqlParameter("CaseID", CaseID));

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

                return(c);
            }