protected void Page_Load(object sender, EventArgs e)
 {
     txt_username.Focus();
     if (!Page.IsPostBack)
     {
         if (CookieManager.GetCookieValue("uid").ToString() != "0")
         {
             string strSeq = "";
             IndustryPlatform.Model.SYS_Organization mOrg = new IndustryPlatform.BLL.SYS_Organization().GetModel(CookieManager.GetCookieValue("orgID").ToString());
             if (mOrg != null)
             {
                 strSeq = mOrg.OrgSeq;
             }
             else
             {
                 strSeq = "-";
             }
             ControlBindHelper.DropDownListBind(this.ddl_position, "SYS_Position", "PositionName", "PositionCode", "IsForbid='0' ", "请选择职位", "0");
         }
         else
         {
             ControlBindHelper.DropDownListBind(this.ddl_position, "SYS_Position", "PositionName", "PositionCode", "IsForbid='0'", "请选择职位", "0");
         }
         this.hf_where.Value = " 1=1 ";
         DBind();
     }
 }
 protected void initPage()
 {
     //初始化字典类型
     ControlBindHelper.DropDownListBind(ddl_type, "SYS_BusinType", "businTypeName", "businTypeID", " 1=1 ", "请选择类型!", "0");
     if (Request.QueryString["did"] == null)
     {
         if (Request.QueryString["typeid"] != "0")
         {
             ddl_type.SelectedValue = Request.QueryString["typeid"];
         }
         //this.txt_privilege.Text = "";
         this.txt_name.Text     = "";
         this.cb_status.Checked = false;
     }
     else
     {
         //加载修改页面信息
         bll_dic    = new SYS_Dictionary();
         entity_dic = bll_dic.GetModel(Request.QueryString["did"], Request.QueryString["tid"]);
         if (entity_dic != null)
         {
             this.txt_name.Text = entity_dic.BusinName;
             //this.txt_privilege.Text = entity_dic.privilege.ToString();
             this.ddl_type.SelectedValue = entity_dic.BusinTypeID;
             this.ddl_type.Enabled       = false;
             this.cb_status.Checked      = entity_dic.IsForbid == "1"?true :false;
         }
         else
         {
             MessageBox.Show(this.Page, "加载数据失败!");
         }
     }
     //txt_name.Focus();
 }
 //选择部门
 private void getDept()
 {
     ControlBindHelper.DropDownListBind(this.ddldept, "Sys_Organization", "OrgName", "OrgCode", " IsForbid='0'", "请选择部门", "");
     if (ddldept.Items.Count > 2)
     {
         this.ddldept.SelectedIndex = 2;
         getUser(this.ddldept.SelectedValue);
     }
 }
    public void OperInfoBind(string strid)
    {
        if (CookieManager.GetCookieValue("uid").ToString() != "0")
        {
            IndustryPlatform.Model.SYS_Organization m = bll.GetModel(CookieManager.GetCookieValue("orgID"));
            strSeq = m.OrgSeq;
            pid    = m.ParentOrgCode.ToString();
            string strOrgType = m.OrgType;
            if (strOrgType == "1")
            {
                lblTypeCode.Text = "选择磅房:";
                ControlBindHelper.DropDownListBind(this.ddl_TypeCode, "TT_Room", "RoomName", "RoomCode", "IsForbid='0'", "请选择磅房", "");
            }
            else if (strOrgType == "2")
            {
                lblTypeCode.Text = "选择煤矿:";
                ControlBindHelper.DropDownListBind(this.ddl_TypeCode, "Sys_Colliery", "CollName", "CollCode", "IsForbid='0'", "请选择煤矿", "");
            }
            if (strOrgType == "1" || strOrgType == "2")
            {
                this.ddl_TypeCode.Visible = true;
                tdTypeCode.Visible        = true;
            }
            else
            {
                this.ddl_TypeCode.Visible = false;
                this.ddl_TypeCode.Items.Clear();
                this.ddl_TypeCode.Items.Add(new ListItem("1", ""));
            }
        }
        bll.OrgDllBind(this.ddl_parentOrgID, strSeq, pid);
        DataSet ds = new DataSet();

        ds = operbll.GetOperatorInfo(strid);

        this.rblist_sex.Items.FindByValue(ds.Tables[0].Rows[0]["Gender"].ToString()).Selected = true;
        this.txt_address.Text = ds.Tables[0].Rows[0]["Address"].ToString();

        //this.rblist_local.Items.FindByValue(ds.Tables[0].Rows[0]["isLocal"].ToString()).Selected = true;

        this.txt_mobile.Text = ds.Tables[0].Rows[0]["MobileNo"].ToString();
        this.txt_email.Text  = ds.Tables[0].Rows[0]["Email"].ToString();
        this.ddl_parentOrgID.SelectedValue = ds.Tables[0].Rows[0]["OrgCode"].ToString();
        ddl_parentOrgID_SelectedIndexChanged(null, null);
        if (ddl_TypeCode.Visible)
        {
            ddl_TypeCode.SelectedValue = ds.Tables[0].Rows[0]["TypeCode"].ToString();
        }

        this.txt_tel.Text = ds.Tables[0].Rows[0]["Tel"].ToString();

        this.txt_pid.Text      = ds.Tables[0].Rows[0]["PID"].ToString();
        this.txt_username.Text = ds.Tables[0].Rows[0]["UserName"].ToString();
        this.zipcode.Text      = ds.Tables[0].Rows[0]["ZipCode"].ToString();
    }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         this.txt_OrgName.Focus();
         if (CookieManager.GetCookieValue("uid").ToString() != "0")
         {
             IndustryPlatform.Model.SYS_Organization m = bll.GetModel(CookieManager.GetCookieValue("orgID"));
             ViewState["SEQ"] = m.OrgSeq;
             ViewState["pid"] = m.ParentOrgCode;
         }
         else
         {
             ViewState["SEQ"] = "";
             ViewState["pid"] = "0";
         }
         bll.OrgDllBind(this.ddl_parentOrgID, ViewState["SEQ"].ToString(), ViewState["pid"].ToString());
         ControlBindHelper.DropDownListBind(this.ddlOrgType, "Sys_Dictionary", "BusinName", "BusinID", "BusinTypeID='1014' and IsForbid='0'", "请选择部门类型", "");
         SetText();
     }
 }
 protected void ddl_parentOrgID_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (this.ddl_parentOrgID.SelectedValue == "")
     {
         this.ddl_TypeCode.Visible = false;
         tdTypeCode.Visible        = false;
         spanStar.Visible          = false;
     }
     else
     {
         string strOrgType = new IndustryPlatform.BLL.SYS_Organization().GetModel(this.ddl_parentOrgID.SelectedValue).OrgType;
         if (strOrgType == "1")
         {
             lblTypeCode.Text = "选择磅房:";
             ControlBindHelper.DropDownListBind(this.ddl_TypeCode, "TT_Room", "RoomName", "RoomCode", "IsForbid='0'", "请选择磅房", "");
         }
         else if (strOrgType == "2")
         {
             lblTypeCode.Text = "选择煤矿:";
             ControlBindHelper.DropDownListBind(this.ddl_TypeCode, "Sys_Colliery", "CollName", "CollCode", "IsForbid='0'", "请选择煤矿", "");
         }
         if (strOrgType == "1" || strOrgType == "2")
         {
             this.ddl_TypeCode.Visible = true;
             tdTypeCode.Visible        = true;
             spanStar.Visible          = true;
         }
         else
         {
             this.tdTypeCode.Visible   = false;
             this.ddl_TypeCode.Visible = false;
             spanStar.Visible          = false;
             this.ddl_TypeCode.Items.Clear();
             this.ddl_TypeCode.Items.Add(new ListItem("1", ""));
         }
     }
 }
示例#7
0
    private void ShowInfo()
    {
        //生成乡镇列表
        ControlBindHelper.DropDownListBind(this.ddlVillageCode, "Sys_Dictionary", "BusinName", "BusinID", "BusinTypeID='1002' and IsForbid='0'", "请选择所属乡镇", "");
        //生成组织部门列表
        ControlBindHelper.DropDownListBind(this.ddlOrgID, "Sys_Organization", "OrgName", "OrgCode", "OrgType='2' and IsForbid='0'", "请选所属煤管站", "-1");
        //bll.OrgDllBind(this.ddlOrgID);

        //生成煤矿状态
        ControlBindHelper.DropDownListBind(this.ddlCollState, "Sys_Dictionary", "BusinName", "BusinID", "BusinTypeID='1007' and IsForbid='0'", "请选择煤矿状态", "");
        if (strCustomer == "FuYuan")
        {
            this.trParcel.Visible = true;
            //片区
            ControlBindHelper.DropDownListBind(this.ddlParcel, "Sys_Dictionary", "BusinName", "BusinID", "BusinTypeID='1018' and IsForbid='0'", "请选择所属片区", "");
        }
        //生成煤矿属性  用于标识该煤矿为正常煤矿、洗煤厂
        ControlBindHelper.DropDownListBind(this.ddlCollProperty, "Sys_Dictionary", "BusinName", "BusinID", "BusinTypeID='1019' and IsForbid='0'", "请选择煤矿属性", "");
        if (Request.QueryString["CollID"] != null)
        {
            model = bll.GetModel(Request.QueryString["CollID"].ToString());

            //this.txtCollCode.Text = model.CollCode;
            this.txtCollName.Text = model.CollName;

            if (model.VillageCode != "")
            {
                this.ddlOrgID.SelectedValue = model.OrgCode.ToString();
            }
            else
            {
                this.ddlOrgID.SelectedIndex = 0;
            }

            if (model.VillageCode != "")
            {
                this.ddlVillageCode.SelectedValue = model.VillageCode;
            }
            else
            {
                this.ddlVillageCode.SelectedIndex = 0;
            }
            this.txtMineOwner.Text  = model.MineOwner;
            this.txtMinePhone.Text  = model.MinePhone;
            this.txtYearOutput.Text = model.YearOutput.ToString();
            if (model.CollProperty != "")
            {
                this.ddlCollProperty.SelectedValue = model.CollProperty;
            }
            else
            {
                this.ddlCollProperty.SelectedIndex = 0;
            }
            if (model.CollState != "")
            {
                this.ddlCollState.SelectedValue = model.CollState;
            }
            else
            {
                this.ddlCollState.SelectedIndex = 0;
            }

            if (model.ImageLicence != "" && model.ImageLicence != null)
            {
                imgImageLicence.Src = "show.aspx?ImageID=" + model.ImageLicence + "&d=" + DateTime.Now.ToString("yyyyMMddhhmmss");
            }
            if (model.ImageRevenue != "" && model.ImageRevenue != null)
            {
                imgImageRevenue.Src = "show.aspx?ImageID=" + model.ImageRevenue + "&d=" + DateTime.Now.ToString("yyyyMMddhhmmss");
            }
            if (model.ImageCompetency != "" && model.ImageCompetency != null)
            {
                imgImageCompetency.Src = "show.aspx?ImageID=" + model.ImageCompetency + "&d=" + DateTime.Now.ToString("yyyyMMddhhmmss");
            }


            hidImageLicence.Value = model.ImageLicence;

            hidImageRevenue.Value = model.ImageRevenue;

            hidImageCompetency.Value = model.ImageCompetency;

            this.txtRemark.Text            = model.Remark;
            this.ddlIsForbid.SelectedValue = model.IsForbid;
            if (strCustomer == "FuYuan")
            {
                this.ddlParcel.SelectedValue = model.ParcelCode;
            }

            //判断煤矿是否已经发过标示卡,如果发过,则不允许修改煤矿编号
            //if ("" != bll.Getresult("CollCode", "TT_MarkedCard", "CollCode ='" + Request.QueryString["CollID"].ToString() + "'"))
            //{
            //    this.ViewState["CollCode"] = txtCollCode.Text;
            //    txtCollCode.Enabled = false;
            //}
            hf_action.Value = "edit";
        }
        else
        {
            // this.txtCollCode.Text = "";
            this.txtCollName.Text             = "";
            this.ddlOrgID.SelectedIndex       = 0;
            this.ddlVillageCode.SelectedIndex = 0;
            this.txtMineOwner.Text            = "";
            this.txtMinePhone.Text            = "";
            this.txtYearOutput.Text           = "0";
            this.ddlCollState.SelectedIndex   = 0;
            hidImageLicence.Value             = "";
            hidImageRevenue.Value             = "";
            hidImageCompetency.Value          = "";

            this.imgImageLicence.Visible    = false;
            this.imgImageRevenue.Visible    = false;
            this.imgImageCompetency.Visible = false;
            this.txtRemark.Text             = "";

            //this.ddlIsForbid.SelectedValue = "-1";
        }
        ScriptManager.RegisterStartupScript(this.upDepartAdd, this.GetType(), "", "initPic();", true);
    }
示例#8
0
 //初始化加载
 private void IndexLoadBind()
 {
     //生成乡镇列表
     ControlBindHelper.DropDownListBind(this.ddlVillageCode, "Sys_Dictionary", "BusinName", "BusinID", "BusinTypeID='1002' and IsForbid='0'", "请选择所属乡镇", "-1");
     DBind();
 }
 private void getUser(string orgCode)
 {
     ControlBindHelper.DropDownListBind(this.ddluser, "Sys_Operator", "UserName", "UserCode", " IsForbid='0' and OrgCode='" + orgCode + "'", "请选择用户", "");
 }