Exemplo n.º 1
0
 /// <summary>
 /// 获取要修改的信息
 /// </summary>
 protected void GetOnePosInfo()
 {
     try
     {
         Tb_PosInfo    mpos          = (baseDataManage.CallMethod("Tb_PosInfo", "GetList", null, new Object[] { "id='" + Guid.Parse(ViewState["Id"].ToString()) + "'" }) as List <Tb_PosInfo>)[0];
         SQLEXDAL_Base sqlexdal_base = new SQLEXDAL_Base();
         DataTable     table         = sqlexdal_base.ExecuteStrSQL("select UninAllName,UninCode,RoleType,LoginName from User_Company _cpy inner join User_Employees _user on _cpy.UninCode=_user.CpyNo where _user.IsAdmin=0 and UninCode = '" + mpos.CpyNo + "'");
         txtTerminalNo.Text    = mpos.PosNo.ToString();
         ddltype.SelectedValue = mpos.PosMode.ToString();
         ddlGYList.Value       = table.Rows[0]["UninCode"].ToString() + "-" + table.Rows[0]["RoleType"].ToString();
         txtfeil.Text          = mpos.PosRate.ToString();
         ddlGYList.Text        = table.Rows[0]["LoginName"].ToString() + "-" + table.Rows[0]["UninAllName"].ToString();
     }
     catch (Exception)
     {
         throw;
     }
 }
Exemplo n.º 2
0
    /// <summary>
    /// 绑定证件
    /// </summary>
    protected void Bind()
    {
        //绑定pos机类型
        List <Bd_Base_Dictionary> list = baseDataManage.CallMethod("Bd_Base_Dictionary", "GetList", null, new Object[] { "ParentID=4 and ChildID in(9,10,11,12,13)" }) as List <Bd_Base_Dictionary>;

        this.ddltype.DataSource = list;
        ddltype.DataTextField   = "ChildName";
        ddltype.DataValueField  = "ChildID";
        this.ddltype.DataBind();


        SQLEXDAL_Base sqlexdal_base = new SQLEXDAL_Base();
        DataTable     table         = sqlexdal_base.ExecuteStrSQL("select UninAllName,UninCode,RoleType,LoginName from User_Company _cpy inner join User_Employees _user on _cpy.UninCode=_user.CpyNo where _user.IsAdmin=0 and  len(UninCode) > 12 and UninCode like '" + mCompany.UninCode + "%' order by LoginName");

        ddlGYList.DataTableSource = table;
        ddlGYList.DataFiledText   = "LoginName-UninAllName";
        ddlGYList.DataFiledValue  = "UninCode-RoleType";
        ddlGYList.DataBind();
        //绑定
        //List<User_Company> listcpy = baseDataManage.CallMethod("User_Company", "GetList", null, new Object[] { "len(UninCode) > 12 and UninCode like '" + mCompany.UninCode + "%'" }) as List<User_Company>;
        //for (int i = 0; i < listcpy.Count; i++)
        //{
        //    listcpy[i].UninCode = listcpy[i].UninCode + "^" + listcpy[i].RoleType;
        //}
        //ddlcpy.DataSource = listcpy;
        //ddlcpy.DataTextField = "UninAllName";
        //ddlcpy.DataValueField = "UninCode";
        //ddlcpy.DataBind();
        //hidCustomervalue(listcpy);
        ///////////////////////////////
        //SQLEXDAL_Base sqlexdal_base = new SQLEXDAL_Base();
        //DataTable table = sqlexdal_base.ExecuteStrSQL("select UninAllName,UninCode,RoleType,LoginName from User_Company _cpy inner join User_Employees _user on _cpy.UninCode=_user.CpyNo where _user.IsAdmin=0 and  len(UninCode) > 12 and UninCode like '" + mCompany.UninCode + "%'");
        //ddlcpy_0.Items.Clear();
        //ddlcpy_0.Items.Add(new ListItem("---请选择用户---", ""));
        //if (table != null && table.Rows.Count > 0)
        //{
        //    foreach (DataRow dr in table.Rows)
        //    {
        //        ListItem li = new ListItem(dr["LoginName"].ToString() + "-" + dr["UninAllName"].ToString(), dr["UninCode"].ToString() + "@" + dr["LoginName"].ToString() + "@" + dr["UninAllName"].ToString()+"@"+dr["RoleType"].ToString());
        //        ddlcpy_0.Items.Add(li);
        //    }
        //}
    }
Exemplo n.º 3
0
 /// <summary>
 /// 执行查询语句
 /// </summary>
 /// <param name="sql"></param>
 /// <returns></returns>
 public DataTable ExecuteStrSQL(string sql)
 {
     return(sqlEXDAL_Base.ExecuteStrSQL(sql));
 }