Exemplo n.º 1
0
        private void txtEditionCode_OnCompleteSearch()
        {
            if (cmbApplicable.Text.Length == 0)
            {
                MessageDialog.ShowPromptMessage("请先选择适用范围");
                txtEditionCode.Text = "";
                txtEditionCode.Tag  = null;
                return;
            }

            if (txtEditionCode.DataResult == null)
            {
                return;
            }

            txtEditionCode.Text = txtEditionCode.DataResult["图号型号"].ToString();

            if (lbSDBStatus.Text == ProductOrderListStatus.新建单据.ToString())
            {
                m_listDebitSchedule = new List <View_S_DebitSchedule>();
                DataTable tempTable = m_findProductOrder.GetAllData(txtEditionCode.Text.ToString(),
                                                                    GlobalObject.GeneralFunction.StringConvertToEnum <CE_DebitScheduleApplicable>(cmbApplicable.Text));

                foreach (DataRow dr in tempTable.Rows)
                {
                    View_S_DebitSchedule tempLnq = new View_S_DebitSchedule();

                    tempLnq.单据号      = txtSDBNo.Text;
                    tempLnq.规格       = dr["规格"].ToString();
                    tempLnq.基数       = (decimal)dr["基数"];
                    tempLnq.图号型号     = dr["零件编码"].ToString();
                    tempLnq.物品ID     = (int)dr["物品ID"];
                    tempLnq.物品名称     = dr["零件名称"].ToString();
                    tempLnq.总成编码     = dr["产品编码"].ToString();
                    tempLnq.适用范围     = dr["适用范围"].ToString();
                    tempLnq.一次性整台份发料 = Convert.ToBoolean(dr["一次性整台份发料"]);

                    m_listDebitSchedule.Add(tempLnq);
                }

                RefreshDataGridView(m_listDebitSchedule);
            }
        }
 private void ShowDgv()
 {
     Dgv_Main.DataSource = m_findProductOrder.GetAllData(tbsEditionName.Tag.ToString(),
                                                         GeneralFunction.StringConvertToEnum <CE_DebitScheduleApplicable>(cmbApplicable.Text));
 }