本文整理汇总了C#中Feature.getWeight方法的典型用法代码示例。如果您正苦于以下问题:C# Feature.getWeight方法的具体用法?C# Feature.getWeight怎么用?C# Feature.getWeight使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Feature
的用法示例。
在下文中一共展示了Feature.getWeight方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
MaintainScrollPositionOnPostBack = true;
if (Request.QueryString["ID"] != null)
{
updateProjectPercent();
ID = Request.QueryString["ID"].ToString();
string IP = Request.ServerVariables["HTTP_X_FORWARDED_FOR"] ?? Request.ServerVariables["REMOTE_ADDR"];
currentProject = new Project(int.Parse(ID));
//DataTable DT = theCake.getTask(Int32.Parse(ID), theCake.getActiveUserName(IP));
if (!currentProject.isValid)
{
Response.Redirect("Home.aspx");
}
//string ownerAlias = userClass.getUserAlias(Int32.Parse(DT.Rows[0]["ownerID"].ToString()));
userClass projOwner = new userClass(currentProject.getOwnerID());
if (theCake.getActiveUserName(IP) != projOwner.getOwnerAlias())
{
int userID = theCake.getUserID(theCake.getActiveUserName(IP));
DataTable permissionChecker = theCake.getUserProjectPermissions(userID, Int32.Parse(ID));
if (permissionChecker.Rows[0]["permission_Project_Write"].ToString() == "0")
ProjectWrite = false;
if (permissionChecker.Rows[0]["permission_Board_Write"].ToString() == "0")
BoardWrite = false;
}
if (!ProjectWrite)
{
pnl_EditOperations.Visible = false;
pnl_SpecialOptions.Visible = false;
}
if (!BoardWrite)
{
btn_AddComment.Visible = false;
}
lbl_TaskName.Text = currentProject.getTaskName(); //DT.Rows[0]["taskName"].ToString();
lbl_Description.Text = currentProject.getTaskDescription(); //DT.Rows[0]["taskDescription"].ToString();
lbl_projectOwner.Text = "<a href=\"UserProfile.aspx?userID=" + currentProject.getOwnerID() + "\">" + projOwner.getDisplayName();
btn_ViewProjectReport.PostBackUrl = "printProjectReport.aspx?ID=" + Request.QueryString["ID"].ToString();
btn_ViewMemberReport.PostBackUrl = "printMemberReport.aspx?ID=" + Request.QueryString["ID"].ToString();
if (!IsPostBack)
{
txt_Edit_TaskName.Text = currentProject.getTaskName();
txt_Edit_TaskDescription.Text = currentProject.getTaskDescription(); //DT.Rows[0]["taskDescription"].ToString();
}
lbl_ExpectedStart.Text = currentProject.getExpectedStart().ToShortDateString();
lbl_ExpectedStop.Text = currentProject.getExpectedStop().ToShortDateString();
if (currentProject.getActualStart() == DateTime.MinValue) lbl_ActualStart.Text = "Not Yet Started";
else lbl_ActualStart.Text = currentProject.getActualStart().ToShortDateString();
if (currentProject.getActualStop() == DateTime.MinValue) lbl_ActualStop.Text = "Not Yet Completed";
else lbl_ActualStop.Text = currentProject.getActualStop().ToShortDateString();
if (currentProject.getDoneFlag())
{
btn_markDone.Visible = false;
btn_markWip.Visible = true;
btn_UpgradeSize.Visible = false;
AddComments.Visible = false;
FillMilestones();
getallBoards();
}
else
{
if (Request.QueryString["feat"] != null)
{
if (!IsPostBack)
{
Feature ftr = new Feature(int.Parse(Request.QueryString["feat"].ToString()));
lbl_remChildFeature_Name.Text = ftr.getFeatureName();
lbl_remChildFeature_Description.Text = ftr.getFeatureDescription();
lbl_remChildFeature_PercentComplete.Text = ftr.getPercentComplete().ToString() + "%";
btnRemFeature.CommandArgument = ftr.getID().ToString();
txt_editChildFeature_Name.Text = ftr.getFeatureName();
txt_editChildFeature_Description.Text = ftr.getFeatureDescription();
for (int i = 0; i <= 100; i++)
{
ddl_editChildFeature_PercentComplete.Items.Add(i.ToString());
}
for (int i = 1; i <= 5; i++)
{
ddl_editChildFeature_Weight.Items.Add(i.ToString());
ddl_addChildFeature_Weight.Items.Add(i.ToString());
}
ddl_editChildFeature_PercentComplete.SelectedIndex = ftr.getPercentComplete();
ddl_editChildFeature_Weight.SelectedIndex = ftr.getWeight() - 1;
if (ftr.hasChildren)
{
//.........这里部分代码省略.........
示例2: btn_gotoUpdateMilestone
protected void btn_gotoUpdateMilestone(object sender, EventArgs e)
{
int featureID = Int32.Parse(((LinkButton)sender).CommandArgument);
//btn_UpdateMilestone.CommandArgument = featureID.ToString();
Feature ftr = new Feature(featureID);
txt_Milestone_Desc.Text = ftr.getFeatureDescription();
txt_Milestone_Name.Text = ftr.getFeatureName();
ddl_Milestone_Weight.SelectedValue = ftr.getWeight().ToString();
//btn_UpdateMilestone.Visible = true;
//btn_AddMilestone.Visible = false;
btn_AddMilestone_Final.Visible = false;
//pnl_AddMilestone.Visible = true;
}