예제 #1
0
 void txtcCustName_GetDataSourced(TextChooser tc, string sqlString)
 {
     try
     {
         if (sqlString.Contains("tb_customer"))
         {
             string fileds = "cust_name,cust_code";
             sqlString = sqlString.Replace("*", fileds);
         }
         else if (sqlString.Contains("tb_supplier"))
         {
             string fileds = "sup_code,sup_full_name";
             sqlString = sqlString.Replace("*", fileds);
         }
         DataTable dvt = CommonFuncCall.GetDataSource(sqlString);
         tc.SetDataSource(dvt);
         if (dvt != null)
         {
             tc.Search();
         }
     }
     catch (Exception ex)
     {
         HXCPcClient.GlobalStaticObj.GlobalLogService.WriteLog(ex);
     }
 }
예제 #2
0
        /// <summary> 绑定配件类型名称到选择器
        /// </summary>
        /// <param name="tc"></param>
        /// <param name="sqlString"></param>
        private static void PartsType_NameBindData(TextChooser tc, string sqlString)
        {
//            sqlString = string.Format(@"select dic_name from sys_dictionaries where dic_id not in
//                                      (select parent_id from sys_dictionaries) and dic_name like '%{0}%'", tc.Text);
//            DataTable dt = CommonFuncCall.GetDataSource(sqlString);
//            tc.SetDataSource(dt);
//            if (dt != null)
//            {
//                tc.Search();
//            }
            string        dic_ids     = string.Empty;
            List <string> list_dic_id = new List <string>();

            CreateTreeViewChildNode(list_dic_id, "sys_parts_category");
            if (list_dic_id.Count > 0)
            {
                foreach (string dic_id in list_dic_id)
                {
                    dic_ids += "'" + dic_id + "',";
                }
            }
            dic_ids   = dic_ids.Trim(',');
            sqlString = string.Format(@"select dic_name from sys_dictionaries where dic_id in ({0}) and dic_name like '%{1}%'", dic_ids, tc.Text);
            DataTable dt = CommonFuncCall.GetDataSource(sqlString);

            tc.SetDataSource(dt);
            if (dt != null)
            {
                tc.Search();
            }
        }
        /// <summary>
        /// 设置速查
        /// </summary>
        /// <param name="sqlString"></param>
        void tc_GetDataSourced(TextChooser tc, string sqlString)
        {
            DataTable dvt = CommonFuncCall.GetDataSource(sqlString);

            tc.SetDataSource(dvt);
            if (dvt != null)
            {
                tc.Search();
            }
        }
예제 #4
0
        /// <summary> 绑定供应商名称到选择器
        /// </summary>
        /// <param name="tc"></param>
        /// <param name="sqlString"></param>
        private static void Sup_NameBindData(TextChooser tc, string sqlString)
        {
            DataTable dt = CommonFuncCall.GetDataSource(sqlString);

            tc.SetDataSource(dt);
            if (dt != null)
            {
                tc.Search();
            }
        }
예제 #5
0
        private void Sup_CodeBindData(string sqlString)
        {
            DataTable dt = CommonFuncCall.GetDataSource(sqlString);

            this.txtsup_code.SetDataSource(dt);
            if (dt != null)
            {
                this.txtsup_code.Search();
            }
        }
예제 #6
0
        void txtBelongCompany_GetDataSourced(ServiceStationClient.ComponentUI.TextBox.TextChooser tc, string sqlString)
        {
            sqlString = string.Format("select * from sys_user where user_name like '%{0}%' and enable_flag=1 and status=1", txtcreate_by.Text);
            DataTable dvt = CommonFuncCall.GetDataSource(sqlString);

            tc.SetDataSource(dvt);
            if (dvt != null)
            {
                tc.Search();
            }
        }
예제 #7
0
        void txtparent_id_GetDataSourced(ServiceStationClient.ComponentUI.TextBox.TextChooser tc, string sqlString)
        {
            sqlString = string.Format("select * from v_dictionaries where dic_name like '%{0}%' and enable_flag=1 ", txtparent_id.Text);
            DataTable dvt = CommonFuncCall.GetDataSource(sqlString);

            tc.SetDataSource(dvt);
            if (dvt != null)
            {
                tc.Search();
            }
        }
예제 #8
0
        /// <summary> 绑定配件类型名称到选择器
        /// </summary>
        /// <param name="tc"></param>
        /// <param name="sqlString"></param>
        private static void PartsType_NameBindData(TextChooser tc, string sqlString)
        {
            sqlString = string.Format(@"select dic_name from sys_dictionaries where dic_id not in 
                                      (select parent_id from sys_dictionaries) and dic_name like '%{0}%'", tc.Text);
            DataTable dt = CommonFuncCall.GetDataSource(sqlString);

            tc.SetDataSource(dt);
            if (dt != null)
            {
                tc.Search();
            }
        }
예제 #9
0
        /// <summary>
        /// 设置速查
        /// </summary>
        /// <param name="sqlString"></param>
        void tc_GetDataSourced(TextChooser tc, string sqlString)
        {
            if (sqlString.Contains("v_vehicle"))
            {
                string fileds = string.Format(" license_plate,vin,engine_num,v_model,v_brand,v_color,turner,cust_code,cust_id,cust_name,cont_name,{0} phone ", EncryptByDB.GetDesFieldValue("cont_phone"));
                sqlString = sqlString.Replace("*", fileds);
            }
            DataTable dvt = CommonFuncCall.GetDataSource(sqlString);

            tc.SetDataSource(dvt);
            if (dvt != null)
            {
                tc.Search();
            }
        }
 /// <summary>
 /// 设置速查
 /// </summary>
 /// <param name="sqlString"></param>
 void tc_GetDataSourced(TextChooser tc, string sqlString)
 {
     try
     {
         DataTable dvt = CommonFuncCall.GetDataSource(sqlString);
         tc.SetDataSource(dvt);
         if (dvt != null)
         {
             tc.Search();
         }
     }
     catch (Exception ex)
     {
         HXCPcClient.GlobalStaticObj.GlobalLogService.WriteLog(ex);
     }
 }
예제 #11
0
 void txtcParts_GetDataSourced(TextChooser tc, string sqlString)
 {
     try
     {
         string fileds = "parts_name,ser_parts_code";
         sqlString = sqlString.Replace("*", fileds);
         DataTable dvt = CommonFuncCall.GetDataSource(sqlString);
         tc.SetDataSource(dvt);
         if (dvt != null)
         {
             tc.Search();
         }
     }
     catch (Exception ex)
     {
         HXCPcClient.GlobalStaticObj.GlobalLogService.WriteLog(ex);
     }
 }