当前位置: 首页>>代码示例>>C#>>正文


C# Customer.isEmployee方法代码示例

本文整理汇总了C#中Customer.isEmployee方法的典型用法代码示例。如果您正苦于以下问题:C# Customer.isEmployee方法的具体用法?C# Customer.isEmployee怎么用?C# Customer.isEmployee使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Customer的用法示例。


在下文中一共展示了Customer.isEmployee方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: MunchChargeOnlySetup

 public void MunchChargeOnlySetup(bool isCafe, Customer customer)
 {
     bool flag = ((customer == null) || ((customer.MunchMoney <= 0M) && customer.isStudent())) || customer.isInactive();
     string str = "Munch Money";
     bool flag2 = false;
     if ((customer != null) && customer.isEmployee())
     {
         str = "Employee Charge";
         flag2 = true;
     }
     this.lblCustType.Visible = isCafe;
     this.lblCustTypeValue.Visible = isCafe;
     this.lblMealPlan.Visible = isCafe;
     this.lblMealPlanValue.Visible = isCafe;
     if (flag)
     {
         isCafe = false;
     }
     this.chkSpecial.Visible = isCafe;
     this.lblMMAvailable.Visible = !flag;
     this.lblMMAvailableLabel.Visible = !flag;
     this.lblPriceOfMeal.Visible = isCafe;
     this.txtCostPerMeal.Visible = isCafe;
     this.lblMeal.Visible = isCafe;
     this.lblMealValue.Visible = isCafe;
     this.lblNumberOfGuests.Visible = isCafe;
     this.txtNumGuests.Visible = isCafe;
     this.txtTotalCharge.ReadOnly = isCafe;
     if (isCafe)
     {
         this.txtTotalCharge.BorderStyle = BorderStyle.None;
     }
     else
     {
         this.txtTotalCharge.BorderStyle = BorderStyle.NotSet;
     }
     this.btnAddMunchCharge.Visible = !flag;
     this.lblTotalCharge.Visible = !flag;
     this.txtTotalCharge.Visible = !flag;
     if (flag)
     {
         this.lblEnterGuests.Text = "No " + str;
     }
     else if (isCafe)
     {
         this.lblEnterGuests.Text = "Enter Guests on " + str;
     }
     else
     {
         this.lblEnterGuests.Text = "Enter Charges on " + str;
     }
     if (flag2)
     {
         this.lblMMAvailableLabel.Text = "Current " + str + ":";
     }
     else
     {
         this.lblMMAvailableLabel.Text = str + " Available:";
     }
 }
开发者ID:geoffritchey,项目名称:cafeteria,代码行数:60,代码来源:Default.aspx.cs

示例2: btnFindId_Click

 protected void btnFindId_Click(object sender, EventArgs e)
 {
     this.lblMunchError.Visible = false;
     this.transactionCompleted(false);
     string path = null;
     this.txtNumGuests.Text = "0";
     this.txtTotalChargeCopy.Text = "0";
     this.lblError.Visible = false;
     this.lblEmpChargeValue.Visible = false;
     this.lblEmpCharge.Visible = false;
     this.lblCurMeals.Visible = false;
     this.lblCurMealsValue.Visible = false;
     this.lblMunchError.Visible = false;
     this.Image1.ImageUrl = this.pictureLocation + this.pictureDefault;
     this.lblIdNumValue.Text = this.tbID.Text;
     Customer customer = new Customer();
     customer.find("(c.[PeopleID]='" + this.tbID.Text + "')");
     Location location = (Location)this.Session["location"];
     this.MunchChargeOnlySetup(location.isCafe(), customer);
     if (customer.PeopleID != null)
     {
         if (customer.isEmployee())
         {
             customer.MealCost = this.empMealCost;
         }
         else
         {
             customer.MealCost = this.mealCost;
         }
         path = this.pictureLocation + this.tbID.Text + this.pictureFormat;
         if (MyFile.Exists(path))
         {
             this.Image1.ImageUrl = path;
         }
         this.lblFirstName.Text = customer.FirstName;
         this.lblLastName.Text = customer.LastName;
         this.lblCustTypeValue.Text = customer.CustomerType;
         if (customer.isEmployee())
         {
             this.lblMMAvailable.Text = customer.EmployeeCharges.ToString("#,##0.00");
         }
         else if (customer.isStudent())
         {
             this.lblMMAvailable.Text = customer.MunchMoney.ToString("#,##0.00");
         }
         else
         {
             this.lblMMAvailable.Text = "";
         }
         this.lblMealPlanValue.Text = customer.PlanId;
         this.lblCurMealsValue.Text = customer.CurrentMeals.ToString();
         this.lblEmpChargeValue.Text = customer.EmployeeCharges.ToString("#,##0.00");
         this.Session["customer"] = customer;
         string id = this.empMealCost.Id;
         string description = this.empMealCost.Description;
         string text3 = customer.MealCost.Id;
         ICharge charge = null;
         if (location.isCafe())
         {
             if (customer.isEmployee())
             {
                 charge = new CafeEmpCharge();
                 this.lblEmpCharge.Visible = true;
                 this.lblEmpChargeValue.Visible = true;
             }
             else
             {
                 charge = new CafeStudentCharge();
                 this.lblCurMeals.Visible = true;
                 this.lblCurMealsValue.Visible = true;
             }
         }
         else
         {
             charge = new GenericCharge();
         }
         try
         {
             charge.Execute(customer);
         }
         catch (Exception exception)
         {
             this.lblError.Text = exception.Message;
             this.lblError.Visible = true;
         }
     }
     else
     {
         this.lblError.Visible = true;
         this.lblFirstName.Text = "";
         this.lblLastName.Text = "";
     }
     this.lblCurMealsValue.Text = customer.CurrentMeals.ToString();
     this.lblEmpChargeValue.Text = customer.EmployeeCharges.ToString("#,##0.00");
     if (location.isCafe() && customer.isEmployee())
     {
         this.lblMMAvailable.Text = this.lblEmpChargeValue.Text;
     }
     this.tbID.Text = "";
     this.tbID.Focus();
//.........这里部分代码省略.........
开发者ID:geoffritchey,项目名称:cafeteria,代码行数:101,代码来源:Default.aspx.cs


注:本文中的Customer.isEmployee方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。