private void InitialControl()
    {
        oGenControl.GenDDLModel(CGeneral.TypeSelect.Please, ddlModel);

        MDFactory  oMDFactory  = new MDFactory();
        MDLineData oMDLineData = new MDLineData();
        MDMachine  oMDMachine  = new MDMachine();

        oMDFactory  = oFactory.GetFactoryByFactoryID(ViewState["FactoryID"].ToString());
        oMDLineData = oLineData.GetLineDataByLineID(Convert.ToInt32(ViewState["ld_id"]));
        oMDMachine  = oMachine.GetMachineBymc_code(ViewState["mc_code"].ToString());

        if (oMDFactory.ListOfFactory.Count > 0)
        {
            lbFactory.Text = oMDFactory.ListOfFactory[0].FactoryName;
        }
        if (oMDLineData.ListOfLine.Count > 0)
        {
            lbPDLine.Text = oMDLineData.ListOfLine[0].ld_linename;
        }
        if (oMDMachine.ListOfmachine.Count > 0)
        {
            lbMachine.Text = oMDMachine.ListOfmachine[0].mc_code + " " + oMDMachine.ListOfmachine[0].mc_name;
        }
    }
    private void GetMachineName()
    {
        MDMachine oMDMachine = new MDMachine();

        oMDMachine = oMachine.GetMachineBymc_code(ViewState["mc_code"].ToString());
        if (oMDMachine.ListOfmachine.Count > 0)
        {
            lbMachine.Text = oMDMachine.ListOfmachine[0].mc_code;
        }
    }