本文整理汇总了C#中ServiceReference1.Service1Client.GetOffice方法的典型用法代码示例。如果您正苦于以下问题:C# ServiceReference1.Service1Client.GetOffice方法的具体用法?C# ServiceReference1.Service1Client.GetOffice怎么用?C# ServiceReference1.Service1Client.GetOffice使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ServiceReference1.Service1Client
的用法示例。
在下文中一共展示了ServiceReference1.Service1Client.GetOffice方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: btnAddMission2_Click
protected void btnAddMission2_Click(object sender, EventArgs e)
{
ServiceReference1.Service1Client x = new ServiceReference1.Service1Client();
setFields();
ServiceReference1.CompositeMission mission = new ServiceReference1.CompositeMission();
mission.Description = Description;
int oid = Convert.ToInt32(ddOffice.SelectedValue);
ServiceReference1.CompositeOffice office = new ServiceReference1.CompositeOffice();
office = x.GetOffice(oid);
mission.OID = office.OID;
int eid = Convert.ToInt32(ddEmployee.SelectedValue);
ServiceReference1.CompositeEmployee employee = new ServiceReference1.CompositeEmployee();
employee = x.GetEmployee(eid);
mission.EID = employee.EID;
mission.StartDate = Date;
int manager = Convert.ToInt32(ddManager.SelectedValue);
ServiceReference1.CompositeEmployee mana = new ServiceReference1.CompositeEmployee();
mana = x.GetEmployee(manager);
mission.Manager = mana.EID;
x.SaveMission(mission);
buttonsAddMission2();
setFieldsEnabled(false);
updateGW();
}
示例2: gwOffices_RowCommand
protected void gwOffices_RowCommand(object sender, GridViewCommandEventArgs e)
{
int index = Convert.ToInt32(e.CommandArgument);
int id = Convert.ToInt32(gwOffices.DataKeys[index].Value.ToString());
ServiceReference1.CompositeOffice office = new ServiceReference1.CompositeOffice();
ServiceReference1.Service1Client x = new ServiceReference1.Service1Client();
office = x.GetOffice(id);
Tbnamn.Text = office.Name.ToString();
Tborgnummer.Text = office.OrgNumber.ToString();
Tbzipcode.Text = office.ZipCode.ToString();
Tbcity.Text = office.City.ToString();
Tbadress.Text = office.Adress.ToString();
int cid = office.CID;
ddlCountry.ClearSelection();
ddlCountry.Items.FindByValue(cid.ToString()).Selected = true;
}
示例3: gwMissions_RowCommand
protected void gwMissions_RowCommand(object sender, GridViewCommandEventArgs e)
{
int index = Convert.ToInt32(e.CommandArgument);
int id = Convert.ToInt32(gwMissions.DataKeys[index].Value.ToString());
ServiceReference1.CompositeMission mission = new ServiceReference1.CompositeMission();
ServiceReference1.Service1Client x = new ServiceReference1.Service1Client();
mission = x.GetMission(id);
tbDate.Text = mission.StartDate.ToString();
tbDescription.Text = mission.Description;
Calendar.SelectedDate = mission.StartDate;
int officeid = mission.OID;
int managerid = mission.Manager;
int employeeid = mission.EID;
ServiceReference1.CompositeOffice office = new ServiceReference1.CompositeOffice();
ServiceReference1.CompositeEmployee manager = new ServiceReference1.CompositeEmployee();
ServiceReference1.CompositeEmployee employee = new ServiceReference1.CompositeEmployee();
office = x.GetOffice(officeid);
manager = x.GetEmployee(managerid);
employee = x.GetEmployee(employeeid);
ddOffice.ClearSelection();
ddOffice.Items.FindByValue(office.OID.ToString()).Selected = true;
ddManager.ClearSelection();
ddManager.Items.FindByValue(manager.EID.ToString()).Selected = true;
ddEmployee.ClearSelection();
ddEmployee.Items.FindByValue(employee.EID.ToString()).Selected = true;
/*
ListItem off = ddOffice.Items.FindByValue(office.OID.ToString());
ListItem man = ddManager.Items.FindByValue(manager.EID.ToString());
ListItem emp = ddEmployee.Items.FindByText(employee.EID.ToString());
List<ListItem> ddofficelistan = new List<ListItem>();
for (int i = 0; i < ddOffice.Items.Count; i++)
{
ddofficelistan.Add(ddOffice.Items[i]);
}
for (int i = 0; i < ddofficelistan.Count; i++)
{
if (ddofficelistan[i] == off)
{
ddOffice.SelectedIndex = i;
}
}
List<ListItem> ddmanagerlistan = new List<ListItem>();
for (int i = 0; i < ddManager.Items.Count; i++)
{
ddmanagerlistan.Add(ddManager.Items[i]);
}
for (int i = 0; i < ddmanagerlistan.Count; i++)
{
if (ddmanagerlistan[i] == man)
{
ddManager.SelectedIndex = i;
}
}
List<ListItem> ddemployeelistan = new List<ListItem>();
for (int i = 0; i < ddEmployee.Items.Count; i++)
{
ddemployeelistan.Add(ddEmployee.Items[i]);
}
for (int i = 0; i < ddemployeelistan.Count; i++)
{
if (ddemployeelistan[i] == emp)
{
ddEmployee.SelectedIndex = i;
}
}
*/
}