コード例 #1
0
    private void Dasoue()
    {
        DR_Id = Convert.ToInt32(Request.QueryString["DR_Id"]);
        DisobeyRecord dr = DisobeyRecordManager.getDisobeyRecordById(DR_Id);

        image.ImageUrl = dr.BillPhoto;
        rblDR_CarType.SelectedValue = dr.Dr_CarType;
        txtDR_Circs.Text            = dr.DR_Circs;
        txtDR_Date.Value            = dr.DR_Date.ToShortDateString();
        txtDR_Expense.Text          = dr.DR_Expense.ToString();
        txtDR_Explain.Value         = dr.DR_Explain;
        txtDR_Locus.Text            = dr.DR_Locus;
        txtDR_Sum.Text                  = dr.DR_Sum.ToString();
        ddlDR_Type.SelectedValue        = dr.DR_Type;
        txtFactCost.Text                = dr.FactCost.ToString();
        txtRemark.Value                 = dr.Remark;
        image.ImageUrl                  = dr.BillPhoto;
        ddlDR_Department.DataSourceID   = null;
        ddlDR_Department.DataSource     = DepartmentManager.GetAllDepartment();
        ddlDR_Department.DataTextField  = "Departmentname";
        ddlDR_Department.DataValueField = "Id";
        ddlDR_Department.DataBind();
        ddlDR_Department.SelectedValue = ddlDR_Department.Items.FindByText(dr.DR_Department).Value;
        NewMethod();
        ddlDR_People.SelectedValue = ddlDR_People.Items.FindByText(dr.DR_People).Value;
        ddlCarMark.DataSourceID    = null;
        ddlCarMark.DataSource      = CarsManager.GetAllCars();;
        ddlCarMark.DataTextField   = "CarMark";
        ddlCarMark.DataValueField  = "Car_Id";
        ddlCarMark.DataBind();
        ddlCarMark.SelectedValue = ddlCarMark.Items.FindByText(dr.CarMark).Value;
        NewMethod();
    }
コード例 #2
0
    private void Dasoue()
    {
        S_Id = Convert.ToInt32(Request.QueryString["S_Id"]);
        Services se = ServicesManager.getServiceById(S_Id);

        txtBeginDate.Value       = se.BeginDate.ToShortDateString();
        image.ImageUrl           = se.BillPhoto;
        txtS_Reason.Text         = se.S_Reason;
        rblCarType.SelectedValue = se.CarType;
        txtEndDate.Value         = se.EndDate.ToShortDateString();

        txtS_Cost.Text             = se.S_Cost.ToString();
        txtS_FactoryName.Text      = se.S_FactoryName;
        txtS_Result.Text           = se.S_Result;
        ddlS_Type.SelectedValue    = se.S_Type;
        txtUseCost.Text            = se.UseCost.ToString();
        ddlS_Branch.DataSourceID   = null;
        ddlS_Branch.DataSource     = DepartmentManager.GetAllDepartment();
        ddlS_Branch.DataTextField  = "Departmentname";
        ddlS_Branch.DataValueField = "Id";
        ddlS_Branch.DataBind();
        ddlS_Branch.SelectedValue = ddlS_Branch.Items.FindByText(se.S_Branch).Value;

        ddlCarMark.DataSourceID   = null;
        ddlCarMark.DataSource     = CarsManager.GetAllCars();
        ddlCarMark.DataTextField  = "CarMark";
        ddlCarMark.DataValueField = "Car_Id";
        ddlCarMark.DataBind();
        ddlCarMark.SelectedValue = ddlCarMark.Items.FindByText(se.CarMark).Value;

        NewMethod();
        ddlS_People.SelectedValue     = ddlS_People.Items.FindByText(se.S_People).Value;
        ddlJerquePeople.SelectedValue = ddlJerquePeople.Items.FindByText(se.JerquePeople).Value;
    }
コード例 #3
0
ファイル: elseCost.aspx.cs プロジェクト: 262734254/OA
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            string name = "0";
            CS_Id = Convert.ToInt32(Request.QueryString["CS_Id"]);
            name  = Request.QueryString["CS_name"];
            if (CS_Id != 0)
            {
                CostSupervise cs = CostSuperviseManager.getCostSuperviseById(CS_Id);
                txtCS_Date.Value       = cs.CS_Date.ToShortDateString();
                ddlMark.DataSourceID   = null;
                ddlMark.DataSource     = CarsManager.GetAllCars();
                ddlMark.DataTextField  = "CarMark";
                ddlMark.DataValueField = "Car_Id";
                ddlMark.DataBind();
                ddlMark.SelectedItem.Text = cs.CarMark;
                ddlCS_Item.SelectedValue  = cs.CS_Item;
                txtC_Sum.Text             = cs.CS_Cost.ToString();
                rblCarType.SelectedValue  = cs.CS_CarType;
                image.ImageUrl            = cs.BillPhoto;
                txtRemark.Value           = cs.Remark;
            }

            if (name == "Up")
            {
                rblCarType.Enabled = false;
                ddlMark.Enabled    = false;
            }
            //else
            //{
            //    rblCarType.Enabled = false;
            //}
        }
    }
コード例 #4
0
ファイル: Cheer.aspx.cs プロジェクト: 262734254/OA
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         rblCarType.Enabled = true;
         ddlCarMark.Enabled = true;
         int    C_Id = 1;
         string name = "0";
         C_Id = Convert.ToInt32(Request.QueryString["C_Id"]);
         name = Request.QueryString["C_name"];
         if (C_Id != 0)
         {
             Cheer ch = CheerManager.getCheerById(C_Id);
             ddlCarMark.DataSourceID   = null;
             ddlCarMark.DataSource     = CarsManager.GetAllCars();
             ddlCarMark.DataTextField  = "CarMark";
             ddlCarMark.DataValueField = "Car_Id";
             ddlCarMark.DataBind();
             ddlCarMark.SelectedItem.Text = ch.CarMark;
             ddlCheerType.SelectedValue   = ch.C_CheerType;
             txtCheerDate.Value           = ch.C_Date.ToShortDateString();
             txtMoney.Text            = ch.C_Sum.ToString();
             txtStation.Text          = ch.C_Station;
             rblCarType.SelectedValue = ch.C_CarType;
             txtRemark.Value          = ch.Remark;
             image.ImageUrl           = ch.BillPhoto;
         }
         if (name == "Up")
         {
             rblCarType.Enabled = false;
             ddlCarMark.Enabled = false;
         }
         //else
         //{
         //    rblCarType.Enabled = false;
         //}
     }
 }