Beispiel #1
0
 public static bool CompanyExists(Guid organizationId, int BWAAccountID,
                                  string name)
 {
     Company comp = new Company(organizationId);
     comp.Where.Company_name.Value = name;
     comp.Where.Company_name.Operator = NCI.EasyObjects.WhereParameter.Operand.Equal;
     comp.Where.BWAAccountId.Value = BWAAccountID;
     comp.Where.BWAAccountId.Operator = NCI.EasyObjects.WhereParameter.Operand.Equal;
     comp.Query.Load();
     return (comp.RowCount == 0 ? false : true);
 }
Beispiel #2
0
 // for external use - web service
 public static DataSet GetCompanyData(Guid organizationId, int companyID)
 {
     Company comp = new Company(organizationId);
     comp.Where.Company_id.Value = companyID;
     comp.Where.Company_id.Operator = WhereParameter.Operand.Equal;
     comp.Query.AddResultColumn(tbl_companySchema.BWAAccountId);
     comp.Query.AddResultColumn(tbl_companySchema.BWADepartmentId);
     comp.Query.AddResultColumn(tbl_companySchema.Company_name);
     comp.Query.Load();
     if (comp.DefaultView.Table.Rows.Count > 0)
     {
         DataSet ds = new DataSet();
         ds.Tables.Add(comp.DefaultView.Table);
         return ds;
     }
     return null;
 }
Beispiel #3
0
 public static int GetCompanyID(Guid organizationId, int BWAAccountID,
                                int BWADepartmentID,
                                string name)
 {
     Company comp = new Company(organizationId);
     comp.Where.Company_name.Value = name;
     comp.Where.Company_name.Operator = NCI.EasyObjects.WhereParameter.Operand.Equal;
     comp.Where.BWAAccountId.Value = BWAAccountID;
     comp.Where.BWAAccountId.Operator = NCI.EasyObjects.WhereParameter.Operand.Equal;
     comp.Where.BWADepartmentId.Value = BWADepartmentID;
     comp.Where.BWADepartmentId.Operator = NCI.EasyObjects.WhereParameter.Operand.Equal;
     comp.Query.Load();
     return (comp.RowCount == 0 ? 0 : comp.Company_id);
 }