Ejemplo n.º 1
0
        public string Execute(Hashtable res)
        {
            if (res["UID"] == null || res["UID"].ToString().Trim().Length <= 0)
            {
                return(SiteHelper.GetJsonFromHashTable(null, "faild", "参数不完整"));
            }
            else
            {
                uid = res["UID"].ToString().Trim();

                ListApiResp resp = new ListApiResp();
                resp.Code    = "-1";
                resp.Message = "";

                DictManager dictManager = new DictManager();
                DataTable   dt          = dictManager.GetDictList("05");
                if (dt != null && dt.Rows.Count > 0)
                {
                    List <GetVehicleFaultTypeItem> list = new List <GetVehicleFaultTypeItem>();
                    foreach (DataRow dr in dt.Rows)
                    {
                        GetVehicleFaultTypeItem item = new GetVehicleFaultTypeItem();
                        item.id   = dr["id"].ToString();
                        item.name = dr["name"].ToString();
                        list.Add(item);
                    }
                    resp.List  = list;
                    resp.Total = list.Count;
                    resp.Code  = "0";
                }

                return(JsonConvert.SerializeObject(resp));
            }
        }
Ejemplo n.º 2
0
        private void BindCatelog()
        {
            DictManager dictManager = new DictManager();
            DataTable   dt          = new DataTable();

            dt.Columns.Add("ID", Type.GetType("System.String"));
            dt.Columns.Add("Name", Type.GetType("System.String"));
            DataRow defaultRow = dt.NewRow();

            defaultRow["ID"]   = "";
            defaultRow["Name"] = "全部分类";
            dt.Rows.Add(defaultRow);
            DataTable dt2 = dictManager.GetDictList("04");

            foreach (DataRow row in dt2.Rows)
            {
                DataRow newRow = dt.NewRow();
                newRow["ID"]   = row["ID"].ToString();
                newRow["Name"] = row["Name"];
                dt.Rows.Add(newRow);
            }
            selCatelog.DataSource     = dt;
            selCatelog.DataTextField  = "Name";
            selCatelog.DataValueField = "ID";
            selCatelog.DataBind();
        }
Ejemplo n.º 3
0
        public string Execute(Hashtable params_ht)
        {
            Hashtable res = params_ht;

            if (res["UID"] == null || res["UID"].ToString().Trim().Length <= 0)
            {
                return(SiteHelper.GetJsonFromHashTable(null, "faild", "参数不完整"));
            }
            else
            {
                try
                {
                    uid = res["UID"].ToString().Trim();
                }
                catch
                {
                    return(SiteHelper.GetJsonFromHashTable(null, "faild", "数据格式不正确"));
                }

                DictManager dictManager = new DictManager();
                DataTable   dt          = dictManager.GetDictList("05");
                if (dt == null || dt.Rows.Count <= 0)
                {
                    return(SiteHelper.GetJsonFromHashTable(null, "faild", "亲,没有数据了"));
                }
                else
                {
                    return(JsonHelper.DataTableToJson("success", "获取数据成功", dt, "GetVehicleRepairItems"));
                }
            }
        }
Ejemplo n.º 4
0
        /// <summary>
        /// 添加字典
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public bool InsertDict(WXQ.Enties.Dict model)
        {
            DictManager DictManager = new DictManager();

            model.AddUser = this.OpUserId.ToString();
            return(DictManager.Insert(model));
        }
Ejemplo n.º 5
0
        private void BindCity()
        {
            DictManager dictManager = new DictManager();
            DataTable   dt          = new DataTable();

            dt.Columns.Add("ID", Type.GetType("System.String"));
            dt.Columns.Add("Name", Type.GetType("System.String"));
            DataRow defaultRow = dt.NewRow();

            defaultRow["ID"]   = "";
            defaultRow["Name"] = "";
            dt.Rows.Add(defaultRow);
            DataTable platformTable = dictManager.GetDictList("03");

            foreach (DataRow row in platformTable.Rows)
            {
                DataRow newRow = dt.NewRow();
                newRow["ID"]   = row["ID"].ToString();
                newRow["Name"] = row["Name"];
                dt.Rows.Add(newRow);
            }
            CityID.DataSource     = dt;
            CityID.DataTextField  = "Name";
            CityID.DataValueField = "ID";
            CityID.DataBind();
        }
Ejemplo n.º 6
0
        /// <summary>
        /// 修改字典
        /// </summary>
        /// <param name="r"></param>
        /// <returns></returns>
        public bool UpdateDict(WXQ.Enties.Dict model)
        {
            DictManager DictManager = new DictManager();

            model.UpdateUser = this.OpUserId.ToString();
            return(DictManager.Db.Updateable(model).Where(m => m.DictId == model.DictId).ExecuteCommand() > 0);
        }
Ejemplo n.º 7
0
 public static void BindSyq(ComboBox cb)
 {
     DictManager.BindToCombox(cb, "机动车所有权代码");
     if (cb.Items.Count > 1)
     {
         cb.SelectedIndex = 1;
     }
 }
Ejemplo n.º 8
0
    // Use Awake() to initialize field variables.
    public void Awake()
    {
        //ActionPlanController m_actionPlanController;
        //ActionPlanUpdateController m_actionPlanUpdateController;

        //SimpleBoidsTreeOfVoice m_boidsController;
        //BoidsRendererTreeOfVoice m_boidsRenderer;

        //DictManager m_dictManager;

        //LEDColorGenController m_ledColorGenController;

        //ButtonEventController m_buttonEventController;
        //PointerEventsController m_pointerEventsController;

        //IRSensorMasterController m_irSensorMasterController;
        //LEDMasterController m_ledMasterController;
        //NeuroHeadSetController m_neuroHeadSetController;


        //m_actionPlanController = gameObject.GetComponent<ActionPlanController>();
        m_actionPlanUpdateController = gameObject.GetComponent <ActionPlanUpdateController>();
        //m_boidsController = gameObject.GetComponent<SimpleBoidsTreeOfVoice>();
        // m_boidsRenderer = gameObject.GetComponent<BoidsRendererTreeOfVoice>();

        m_dictManager           = gameObject.GetComponent <DictManager>();
        m_ledColorGenController = gameObject.GetComponent <LEDColorGenController>(); // compute Shader use

        m_pointerEventsController = gameObject.GetComponent <PointerEventsController>();


        // this  gets the reference  to the instance of  class PointerEventsController
        // The instance is automatically created (by new  PointerEventsController() ) when the component is added to the gameObject
        // The gameboject will has the reference to that instance.

        //m_irSensorMasterController = gameObject.GetComponent<IRSensorMasterController>();  //IRSensorMasterControlle component should be added to CommHub game object
        m_ledMasterController = gameObject.GetComponent <LEDMasterController>();  //LEDMasterController component should be added to CommHub game object
        //m_neuroHeadSetController = gameObject.GetComponent<NeuroHeadSetController>(); //NeuroHeadSetController component should be added to CommHub game object



        //In Start(): call actionPlanController.InitActionPlan
        //pointerEventController.onDrag += actionPlanController.ChangeActionTimes;
        //pointerEventController.onDrag += actionPlanController.RedrawActionPlan ==> NO, NO: all drawings are controlled by the Renderer Components such as
        // CanvasRenderer and LineRenderer. All you need to change is to change the locations and properties of the gameobjects involved.
        //pointerEventController.onPointerClick += actionPlanController.MergeOrSplitActionFields;;
        //                           two right mouse clicks merge or split the fields based on the position of the mouse within the field
        //inputField.onEndEdit += actionPlanController.ChangeActionValues
        //neuroHeadSetController.onReceived += boidsController.ChangeColorOfElectrodeBoids
        //irsensorMasterController.onReceived += boidsController.ChangeBrightnessOfInnerCircleBoids;
        // In Update call boidsController.SampleColorsAtLEDPoints
        // In Update call ledMasterController.SendLEDData
        // uiMenuController.onLoadActionPlan += actionPlanController.LoadActionPlan
        // uiMenuController.onSaveActionPlan += actionPlanController.SaveActionPlan
    }
Ejemplo n.º 9
0
        public ApiResp Execute(System.Collections.Hashtable params_ht)
        {
            ApiResp resp = new ApiResp();

            resp.code = "-1";

            string client_id = params_ht["client_id"].ToString();
            long   timestamp = long.Parse(params_ht["timestamp"].ToString());
            string sign      = params_ht["sign"].ToString();

            List <GetCompanyInfo_Item> data = new List <GetCompanyInfo_Item>();

            GetCompanyInfo_Item item = new GetCompanyInfo_Item();

            SysSettingManager settingManager = new SysSettingManager();
            DictManager       dictManager    = new DictManager();

            item.insurance_amount = 0.00;
            item.insurance_url    = "";
            item.return_in_fee    = "";
            string outServiceAreaFee = settingManager.GetValueByKey("OutServiceAreaFee");

            if (outServiceAreaFee.StartsWith("+"))
            {
                item.return_out_fee = string.Format("超出运营区域将加收{0}元调度费", outServiceAreaFee.Substring(1, outServiceAreaFee.Length - 1));
            }
            else
            {
                item.return_out_fee = string.Format("超出运营区域将加收{0}倍作为调度费", outServiceAreaFee.Substring(1, outServiceAreaFee.Length - 1));
            }
            item.call_tel = settingManager.GetValueByKey("ServiceTel");
            DataTable city_dt   = dictManager.GetDictList("03");
            string    open_city = "";

            if (city_dt != null && city_dt.Rows.Count > 0)
            {
                foreach (DataRow dr in city_dt.Rows)
                {
                    if (open_city.Length > 0 && !open_city.EndsWith("|"))
                    {
                        open_city += "|";
                    }
                    open_city += dr["Name"].ToString();
                }
            }
            item.open_city = open_city;
            item.timestamp = (long)(DateTime.Now - new DateTime(1970, 1, 1, 0, 0, 0, 0)).TotalSeconds;
            data.Add(item);

            resp.code = "0";
            resp.msg  = "成功";
            resp.data = data;

            return(resp);
        }
Ejemplo n.º 10
0
        private void BindCity()
        {
            DictManager dict = new DictManager();
            DataTable   dt   = dict.GetDictList("03");

            selCity.DataSource     = dt;
            selCity.DataTextField  = "Name";
            selCity.DataValueField = "ID";
            selCity.DataBind();
            selCity.Items.Insert(0, new ListItem("----全部----", "-1"));
        }
Ejemplo n.º 11
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         ArrayList lists;
         lists = DictManager.GetDictItems("RoleTypeID");
         foreach (string item in lists)
         {
             RoleTypeList.Items.Add(item);
         }
     }
 }
Ejemplo n.º 12
0
        /// <summary>
        /// 根据主键批量删除字典
        /// </summary>
        /// <param name="dictIds"></param>
        /// <returns></returns>
        public bool DeleteDicts(List <int> dictIds)
        {
            DictManager    DictManager = new DictManager();
            List <dynamic> ids         = new List <dynamic>();

            foreach (int id in dictIds)
            {
                ids.Add(id);
            }

            return(DictManager.DeleteByIds(ids.ToArray()));
        }
Ejemplo n.º 13
0
 private void InitComBox()
 {
     if (!this.DesignMode)
     {
         // DictManager.BindCarType(this.cbCarType);
         DictManager.BindCarTypeDynamic(this.cbCarType);
         if (this.lbId.Text.Length == 0)
         {
             this.lbRegDate.Text = System.DateTime.Now.ToString();
         }
     }
 }
Ejemplo n.º 14
0
 public string GetCatelog(string code)
 {
     try
     {
         DictManager dictManager = new DictManager();
         return(dictManager.GetItemName(code));
     }
     catch
     {
         return("");
     }
 }
Ejemplo n.º 15
0
 private void InitComBox()
 {
     if (!this.DesignMode)
     {
         if (this.entity != null)
         {
             this.oldNum = ((InRecord)this.entity).DunShu;
         }
         //this.lbSellDate.Text = System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
         JxcHelper.BindTypeName(this.cbTypeName);
         DictManager.BindToCombox(this.cbFrom, "货品来源");
     }
 }
Ejemplo n.º 16
0
        private void InitComBox()
        {
            if (!this.DesignMode)
            {
                BindingHelper.BindOwner(this.cbOwnerIdValue);
                DictManager.BindCarType(this.cbCarType);
                DictManager.BindCarPinPai(this.cbPinPai);
                DictManager.BindCarState(this.cbState);
                DictManager.BindCarColorDynamic(this.cbFirstColor);
                DictManager.BindCarColorDynamic(this.cbSecondColor);

                DictManager.BindCarColorDynamic(this.cbThirdColor);
            }
        }
Ejemplo n.º 17
0
        private void InitComBox()
        {
            if (!this.DesignMode)
            {
                FT.Windows.CommonsPlugin.BindingHelper.BindProvince(this.cbRegProvince);
                DictManager.BindComeFrom(this.cbComeFrom);
                DictManager.BindBelongArea(this.cbBelongArea);

                this.cbRegProvince.Text = FT.Windows.CommonsPlugin.BindingHelper.GetDefaultProvince();
                this.cbRegCity.Text     = FT.Windows.CommonsPlugin.BindingHelper.GetDefaultCity();
                // this.SetAddress();

                this.txtDescription.KeyDown += new KeyEventHandler(txtDescription_KeyDown);
                this.cbSex.SelectedIndex     = 0;

                this.cbListen.SelectedIndex        = 1;
                this.cbMainBody.SelectedIndex      = 1;
                this.cbTopBody.SelectedIndex       = 1;
                this.cbLeftDownBody.SelectedIndex  = 1;
                this.cbRightDownBody.SelectedIndex = 1;
                this.cbColor.SelectedIndex         = 1;
                this.cbLearnType.SelectedIndex     = 0;

                DictManager.BindIdCardType(this.cbIdCardType);
                DictManager.BindNation(this.cbNation);
                DictManager.BindCarTypeDynamic(this.cbNewCarType);

                DictManager.BindCarStyle(this.cbNewCarStyle);
                DictManager.BindFromRoute(this.cbFromRoute);
                DictManager.BindHospital(this.cbHospital);
                DS.Plugins.Car.BindingHelper.BindCoach(this.cbCoachName);
                DictManager.BindRecommend(this.cbRecommend);


                this.cbNewCarType.SelectedValue = "C1";
                //ArrayList lists = FT.DAL.Orm.SimpleOrmOperator.QueryListAll(typeof(CarInfo));
                //if (lists.Count > 0)
                //{
                //    //this.cbGroup
                //    this.cbHmhp.DataSource = lists;
                //    this.cbHmhp.DisplayMember = "号码号牌";
                //    this.cbHmhp.ValueMember = "号码号牌";
                //    this.cbHmhp.SelectedIndex = 0;
                //}
                //FT.Windows.CommonsPlugin.Entity.DictManager.BindToCombox(this.cbCarType, "准驾车型");
            }
            //this.cbSex.SelectedIndex = 0;
        }
Ejemplo n.º 18
0
        /// <summary>
        /// 字典列表
        /// </summary>
        /// <param name="methodName"></param>
        /// <param name="opUserId"></param>
        /// <param name="bgDt"></param>
        /// <param name="endDt"></param>
        /// <param name="Ip"></param>
        /// <param name="pageModel"></param>
        /// <returns></returns>
        public ListResult <WXQ.Enties.Dict> GetDictList(string GroupName, PageModel pageModel)
        {
            DictManager DictManager             = new DictManager();
            ListResult <WXQ.Enties.Dict> result = new ListResult <Enties.Dict>();

            System.Linq.Expressions.Expression <Func <Enties.Dict, bool> > express = Expressionable.Create <WXQ.Enties.Dict>()
                                                                                     .AndIF(!string.IsNullOrEmpty(GroupName), m => SqlFunc.Contains(m.GroupName, GroupName)).ToExpression();//拼接表达式

            result.Result = string.IsNullOrEmpty(GroupName) ? DictManager.GetPageList(express, pageModel, d => d.GroupName, OrderByType.Asc) : DictManager.GetPageList(express, pageModel, d => d.OrderBy, OrderByType.Asc);


            result.PageSize  = pageModel.PageSize;
            result.PageIndex = pageModel.PageIndex;
            result.Total     = pageModel.PageCount;
            return(result);
        }
Ejemplo n.º 19
0
 protected void Page_Load(object sender, EventArgs e)
 {
     this.PageControl1.pageHandler += new EventHandler(pager_PageChanged);
     if (!IsPostBack)
     {
         DictManager dicManager = new DictManager();
         DataTable   dtDic      = dicManager.GetDict();
         if (dtDic.Rows.Count > 0)
         {
             ////网点马厩绑定
             drpDic.DataSource     = dtDic;
             drpDic.DataTextField  = "Name";
             drpDic.DataValueField = "ID";
             drpDic.DataBind();
             drpDic.Items.Insert(0, new ListItem("--------请选择--------", "-1"));
         }
         DataBindGrid();
     }
 }
Ejemplo n.º 20
0
        /// <summary>
        /// 绑定数据源
        /// </summary>
        private void DataBindGrid()
        {
            DictManager dicManager = new DictManager();



            int              count       = 0;
            StringBuilder    SqlWhere    = new StringBuilder();
            IList <SqlParam> IList_param = new List <SqlParam>();

            if (!this.drpDic.Value.ToString().Equals("-1"))
            {
                SqlWhere.Append(" and DictID = @obj ");
                IList_param.Add(new SqlParam("@obj", this.drpDic.Value.ToString()));
            }

            DataTable dt = dicManager.GetPitsInfoPage(SqlWhere, IList_param, PageControl1.PageIndex, PageControl1.PageSize, ref count);

            ControlBindHelper.BindRepeaterList(dt, rp_Item);
            this.PageControl1.RecordCount = Convert.ToInt32(count);
        }
Ejemplo n.º 21
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                ArrayList lists;
                lists = DictManager.GetDictItems("RoleTypeID");
                foreach (string item in lists)
                {
                    RoleTypeList.Items.Add(item);
                }

                TreeView treeView = (TreeView)Page.Form.FindControl("ContentPlaceHolder1").FindControl("SchoolTreeView");
                TreeNode treeNode = treeView.FindNode("20");
                if (treeNode != null)
                {
                    if (treeNode.Depth == 0)
                    {
                        treeNode.Expand();
                    }
                    else
                    {
                        treeNode.Parent.Expand();
                    }
                }
                else
                {
                    treeView.CollapseAll();
                }

                ViewState["SortColumn"]      = "Code";
                ViewState["OrderDirection"]  = "ASC";
                SchoolGridView.EmptyDataText = "请先设置查询条件,然后点击【查询】按钮!";
                //BindSchoolGridView( "[Code]='0000'" );
                string condition = ConstructSelectCondition();
                BindSchoolGridView(condition);
            }
        }
Ejemplo n.º 22
0
 public UserLoginFirstForm()
 {
     InitializeComponent();
     DictManager.BindCarType(this.cbLearnCar);
     this.cbLearnCar.Text = "C1";
 }
Ejemplo n.º 23
0
 //机动车使用性质代码
 public static void BindUseFor(ComboBox cb)
 {
     DictManager.BindToCombox(cb, "机动车使用性质代码");
 }
Ejemplo n.º 24
0
 //机动车燃料(能源)种类代码
 public static void BindRlzl(ComboBox cb)
 {
     DictManager.BindToComboxDynamic(cb, "机动车燃料(能源)种类代码");
 }
Ejemplo n.º 25
0
 public static void BindJkpz(ComboBox cb)
 {
     DictManager.BindToCombox(cb, "机动车进口凭证代码");
 }
Ejemplo n.º 26
0
 public static void BindGetFrom(ComboBox cb)
 {
     DictManager.BindToCombox(cb, "机动车获得方式代码");
 }
Ejemplo n.º 27
0
 public static void BindGcJk(ComboBox cb)
 {
     DictManager.BindToCombox(cb, "国产/进口车辆代码");
 }
Ejemplo n.º 28
0
 public static void BindGzzmmc(ComboBox cb)
 {
     DictManager.BindToCombox(cb, "购置证明名称代码");
 }
Ejemplo n.º 29
0
 public static void BindBxCompany(ComboBox cb)
 {
     DictManager.BindToCombox(cb, "保险公司代码表");
 }
Ejemplo n.º 30
0
 public static void BindLlpz(ComboBox cb)
 {
     DictManager.BindToComboxDynamic(cb, "机动车来历凭证代码");
 }