本文整理汇总了C#中Organization类的典型用法代码示例。如果您正苦于以下问题:C# Organization类的具体用法?C# Organization怎么用?C# Organization使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Organization类属于命名空间,在下文中一共展示了Organization类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: Organization
public ActionResult Organization(Organization orgSignupData)
{
string userid = new Organization().Signup(orgSignupData);
try
{
if (userid != "")
{
//Registering User is successfull .
TempData["signupemail"] = orgSignupData.email;
TempData["isSignupSuccess"] = 1;
return RedirectToAction("Index", "Login");//Redirecting to the Login Page
}
else
{
TempData["signupemail"] = orgSignupData.email;
TempData["isSignupSuccess"] = 1;
return RedirectToAction("Index","Signup"); //Registering User Failed
}
}
catch
{
return RedirectToAction("Index", "Signup"); //Registering User Failed
}
}
开发者ID:vatsavaideepthi,项目名称:Recruitmetrix,代码行数:27,代码来源:SignupController.cs
示例2: RefCursorOutStoredProcedure
public void RefCursorOutStoredProcedure()
{
ISession s = OpenSession();
ITransaction t = s.BeginTransaction();
Organization ifa = new Organization("IFA");
Organization jboss = new Organization("JBoss");
Person gavin = new Person("Gavin");
Person kevin = new Person("Kevin");
Employment emp = new Employment(gavin, jboss, "AU");
Employment emp2 = new Employment(kevin, ifa, "EU");
s.Save(ifa);
s.Save(jboss);
s.Save(gavin);
s.Save(kevin);
s.Save(emp);
s.Save(emp2);
IQuery namedQuery = s.GetNamedQuery("selectEmploymentsForRegion");
namedQuery.SetString("regionCode", "EU");
IList list = namedQuery.List();
Assert.That(list.Count, Is.EqualTo(1));
s.Delete(emp2);
s.Delete(emp);
s.Delete(ifa);
s.Delete(jboss);
s.Delete(kevin);
s.Delete(gavin);
t.Commit();
s.Close();
}
开发者ID:marchlud,项目名称:nhibernate-core,代码行数:32,代码来源:OracleCustomSQLFixture.cs
示例3: Organizations_Update
public ActionResult Organizations_Update([DataSourceRequest]DataSourceRequest request, Organization organization)
{
if (this.ModelState.IsValid)
{
var entity = new Organization
{
Id = organization.Id,
Name = organization.Name,
MateriallyResponsiblePerson = organization.MateriallyResponsiblePerson,
LogoUrl = organization.LogoUrl,
Vat = organization.Vat,
Address = organization.Address,
IsSupplier = organization.IsSupplier,
CreatedOn = organization.CreatedOn,
ModifiedOn = organization.ModifiedOn,
IsDeleted = organization.IsDeleted,
DeletedOn = organization.DeletedOn
};
this.db.Organizations.Attach(entity);
this.db.Entry(entity).State = EntityState.Modified;
this.db.SaveChanges();
}
return this.Json(new[] { organization }.ToDataSourceResult(request, this.ModelState));
}
开发者ID:NikitoG,项目名称:WarehouseSystem,代码行数:26,代码来源:OrganizationsController.cs
示例4: PlatformClient
/// <summary> Constructor creating connection using token. </summary>
/// <param name="serverUrl"> The URL of the server Platform is running on. </param>
/// <param name="token"> Token that has been created by GetMultiusageToken() method or a single usage one. </param>
public PlatformClient(string serverUrl, string token)
{
this.connector = ServiceConnection.Create(new System.Uri(String.Format(urlFormatString, serverUrl)), token);
this.org = this.connector.Organizations[0];
}
开发者ID:DocuWare,项目名称:Platform.NETClient,代码行数:10,代码来源:PlatformClient.cs
示例5: CreateOrganization
public ActionResult CreateOrganization(CreateOrganizationRequestViewModel model)
{
if (model == null || !this.ModelState.IsValid)
{
this.TempData[GlobalConstants.TempDataErrorKey] = GlobalConstants.InvalidOrganizationRequestErrorMessage;
return this.RedirectToAction(x => x.Index());
}
var organizationToCreate = new Organization()
{
Name = model.OrganizationName,
AboutInfo = model.OrganizationDescription,
UserId = model.UserId,
PhoneNumber = model.PhoneNumber
};
var isCreated = this.organizations.Create(organizationToCreate);
if (!isCreated)
{
this.TempData[GlobalConstants.TempDataErrorKey] = GlobalConstants.InvalidOrganizationRequestErrorMessage;
return this.RedirectToAction(x => x.Index());
}
this.TempData[GlobalConstants.TempDataSuccessKey] = GlobalConstants.CreatedOrganizationSuccessMessage;
this.createOrganizationRequests.ProceedRequest(model.Id);
return this.RedirectToAction(x => x.Index());
}
开发者ID:ni4ka7a,项目名称:GoDrive,代码行数:29,代码来源:ManageRequestsController.cs
示例6: EntityStoredProcedure
public void EntityStoredProcedure()
{
ISession s = OpenSession();
ITransaction t = s.BeginTransaction();
Organization ifa = new Organization("IFA");
Organization jboss = new Organization("JBoss");
Person gavin = new Person("Gavin");
Employment emp = new Employment(gavin, jboss, "AU");
s.Save(ifa);
s.Save(jboss);
s.Save(gavin);
s.Save(emp);
IQuery namedQuery = s.GetNamedQuery("selectAllEmployments");
IList list = namedQuery.List();
Assert.IsTrue(list[0] is Employment);
s.Delete(emp);
s.Delete(ifa);
s.Delete(jboss);
s.Delete(gavin);
t.Commit();
s.Close();
}
开发者ID:marchlud,项目名称:nhibernate-core,代码行数:25,代码来源:CustomStoredProcSupportTest.cs
示例7: getOrganizations
public static List<Organization> getOrganizations()
{
List<Organization> categoryList = new List<Organization>();
//SqlConnection connection = new SqlConnection(GetConnectionString());
SqlConnection connection = new SqlConnection(ConnectStringGenerator.getConnectString());
string sel = "execute usp_selectOrganization";
SqlCommand cmd = new SqlCommand(sel, connection);
connection.Open();
SqlDataReader dr = cmd.ExecuteReader(CommandBehavior.CloseConnection);
Organization org;
while (dr.Read())
{
org = new Organization();
org.OrgID = dr["OrgID"].ToString();
org.OrgDescription = dr["OrgDescription"].ToString();
categoryList.Add(org);
/*
//course.CategoryID = dr["ICategoryID"].ToString();
//course.ShortName = dr["IShortName"].ToString();
//course.LongName = dr["LongName"].ToString();
categoryList.Add(Faculty);
*/
}
dr.Close();
return categoryList;
}
开发者ID:markrae,项目名称:SeniorProject2,代码行数:28,代码来源:OrganizationDB.cs
示例8: GetMemberCount
protected int GetMemberCount(Organization org, bool recursive, Geography geo, DateTime dateTime)
{
string cacheDataKey = "ChartData-AllMembershipEvents-5min";
MembershipEvents events = (MembershipEvents)Cache.Get(cacheDataKey);
if (events == null)
{
events = MembershipEvents.LoadAll();
Cache.Insert(cacheDataKey, events, null, DateTime.UtcNow.AddMinutes(5), System.Web.Caching.Cache.NoSlidingExpiration);
}
DateTime endDateTime = dateTime;
int eventIndex = 0;
int currentCount = 0;
while (eventIndex < events.Count && events[eventIndex].DateTime < endDateTime)
{
if (events[eventIndex].OrganizationId == Organization.PPSEid)
{
currentCount += events[eventIndex].DeltaCount;
}
eventIndex++;
}
return currentCount;
}
开发者ID:SwarmCorp,项目名称:Swarmops,代码行数:29,代码来源:MemberCountHistory.aspx.cs
示例9: SubmitNewProfile_Click
protected void SubmitNewProfile_Click(object sender, EventArgs e)
{
if (MP == MP2)
{
Manager m = new Manager();
m.Lname = MName.Text;
m.Fname = MLName.Text;
m.EmailAdress = MEMail.Text;
m.PassWord = MP.Text;
Organization org = new Organization();
org.Name = OName.Text;
org.Description = Odescription.InnerText;
org.WebSiteUrl = Site.Text;
org.FbWebsite = FaceBook.Text;
org.Address = Addres.Text;
org.PhoneNumber = Phone.Text;
org.LogoSrc = InsertPictureToDirectory();
int change = m.insertNewOrg(m, org);
if (change > 0)
{
Session["Email"] = m.EmailAdress;
Response.Redirect("DashBoard.aspx");
}
}
else
{
}
}
开发者ID:kerenmishael,项目名称:BusinessRealityFinalProject,代码行数:29,代码来源:Default.aspx.cs
示例10: StyleLinkRenderer
public StyleLinkRenderer()
: base()
{
// Set default values (which can be overridden by properties)
switch (WebConfigurationManager.AppSettings[
"nysf_UserControls_DefaultOrganization"].Trim().ToLower())
{
case "pt":
organization = Types.Organization.PublicTheater;
break;
case "jp":
organization = Types.Organization.JoesPub;
break;
case "sitp":
organization = Types.Organization.ShakespeareInThePark;
break;
default:
throw new ApplicationException("An invalid organization was specified in "
+ "web.config under <appSettings> key, "
+ "\"nysf_UserControls_DefaultOrganization\". It must be set to \"pt\", "
+ "\"jp\", or \"sitp\".");
}
//forceOrganization = true;
startOfUrlToStylesheets =
WebConfigurationManager.AppSettings[
"nysf_UserControls_DefaultStartOfUrlToStylesheets"].Trim();
}
开发者ID:ThePublicTheater,项目名称:NYSF,代码行数:28,代码来源:StyleLinkRenderer.ascx.cs
示例11: GetOrganizationAsync
public async Task<Organization> GetOrganizationAsync(string permalink)
{
var organization = new Organization();
var json = await CallApiAsync(OrganizationsURL + permalink);
organization.Load(json);
return organization;
}
开发者ID:jpoon,项目名称:crunchbase,代码行数:7,代码来源:CrunchBase.cs
示例12: accessing_siblings
void accessing_siblings()
{
Organization parent = new Organization("parent", Guid.NewGuid());
Organization childOne = new Organization("first child", Guid.NewGuid());
Organization childTwo = new Organization("second child", Guid.NewGuid());
context["when a parent node has multiple children"] = () =>
{
context["sibling nodes can navigate to one another"] = () =>
{
parent.AddChild(childOne);
parent.AddChild(childTwo);
it["child one should see a child two node"] = () =>
{
var siblings = childOne.Siblings();
Assert.That(siblings, Is.Not.Null);
siblings.should_not_be_empty();
siblings.should_contain(childTwo);
};
it["child two node should see child one node"] = () =>
{
childTwo.Siblings().should_contain(childOne);
};
};
};
}
开发者ID:bforrest,项目名称:Parties,代码行数:28,代码来源:describe_organization.cs
示例13: Page_Load
protected void Page_Load (object sender, EventArgs e)
{
if (_authority.HasPermission(Permission.CanEditMemberships, Organization.PPFIid, Geography.FinlandId, Authorization.Flag.ExactGeographyExactOrganization))
{
loadCntry = Country.FromCode("FI");
geotree = loadCntry.Geography.GetTree();
nowValue = DateTime.Now;
if (!IsPostBack)
{
foreach (Organization org in Organizations.GetAll())
{
if (org.DefaultCountryId == loadCntry.Identity)
{
DropDownListOrgs.Items.Add(new ListItem(org.Name, "" + org.Identity));
}
}
}
else
{
currentOrg = Organization.FromIdentity(Convert.ToInt32(DropDownListOrgs.SelectedValue));
}
}
else
{
Response.Write("Access not allowed");
Response.End();
}
}
开发者ID:SwarmCorp,项目名称:Swarmops,代码行数:28,代码来源:Import.aspx.cs
示例14: EditOrganizationViewModel
public EditOrganizationViewModel(Organization org)
{
Id = org.Id;
Name = org.Name;
IsEmailDomainRestricted = org.IsEmailDomainRestricted;
RestrictedDomain = org.EmailDomains.Count > 0 ? org.EmailDomains.First().Domain : string.Empty;
}
开发者ID:KallDrexx,项目名称:MyJobLeads,代码行数:7,代码来源:EditOrganizationViewModel.cs
示例15: AddOrganization
public void AddOrganization(string userId, Organization organization)
{
var user = this.users.GetById(userId);
user.Organization = organization;
this.users.Save();
}
开发者ID:ni4ka7a,项目名称:GoDrive,代码行数:7,代码来源:UsersService.cs
示例16: ToDataModel
public static Organization ToDataModel(this C.Vendor domain)
{
if (domain == null) return null;
var data = new Organization { OrganizationId = domain.OrganizationId };
return data;
}
开发者ID:timsong,项目名称:OKOS,代码行数:8,代码来源:VendorConversion.cs
示例17: AddParent
public override Organization AddParent(Organization source)
{
throw new InvalidOperationException("Root Organization can not have a parent node.");
/*
* Code to prove the rule works
* return base.AddParent(source);
*/
}
开发者ID:bforrest,项目名称:Parties,代码行数:8,代码来源:OrganizationRoot.cs
示例18: GetDesignTimeHtml
public override string GetDesignTimeHtml()
{
StringWriter writer1 = new StringWriter();
HtmlTextWriter writer2 = new HtmlTextWriter(writer1);
this.OrganizationDemo = (Organization) base.Component;
this.OrganizationDemo.RenderControl(writer2);
return writer1.ToString();
}
开发者ID:lsamu,项目名称:V5_YiMei,代码行数:8,代码来源:OrganizationDesigner.cs
示例19: ResultSegment
public ResultSegment()
{
ContactInfo = new ContactInfoSegment();
Demographics = new DemographicsSegment();
SocialProfiles = new SocialProfile[0];
Organizations = new Organization[0];
Photos = new Photo[0];
}
开发者ID:rapidexpert,项目名称:SlackCommander,代码行数:8,代码来源:FullContactPersonResult.cs
示例20: Save
public void Save(Organization organization)
{
if (organization.IsValid())
{
OrganizationRepo.Save(organization);
}
}
开发者ID:mkhj,项目名称:EcoHotels,代码行数:8,代码来源:OrganizationService.cs
注:本文中的Organization类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论