Explorar o código

以下几个内容帮忙一起调整下:
1、重置站点和取消采集拆解物料的时候,生产信息的物料解除后帮忙把物料条码对应的生产状态表的下一个工单字段信息清空 OK
2、上料采集界面采集的物料条码长度帮忙放宽到200个字符。现在限制是80 OK
3、维修回流默认工序的逻辑帮忙调整一下:
a、已拆解物料没有对应未拆解上料记录的,不允许回流
b、默认回流到检验投入工序,如果途程中没有检验投入工序,默认回流到不良采集工序。如果有多个检验投入工序,默认回流到第一个检验投入工序。 OK
4、维修界面的不良备注在保存维修信息的时候要求必填。 OK

callm hai 1 día
pai
achega
4d412b6aec

+ 6 - 6
UAS-MES/FunctionCode/Make/Make_FeedingCollection.cs

@@ -229,7 +229,7 @@ namespace UAS_MES.Make
                                         return;
                                         return;
                                     }
                                     }
                                 }
                                 }
-                                TSN.Add(code.Text.Substring(0, code.Text.Length > 80 ? 80 : code.Text.Length));
+                                TSN.Add(code.Text.Substring(0, code.Text.Length > 200 ? 200 : code.Text.Length));
                                 if (sp_barcoderule == "BARCODE")
                                 if (sp_barcoderule == "BARCODE")
                                 {
                                 {
                                     sp_soncode = ErrorMessage;
                                     sp_soncode = ErrorMessage;
@@ -365,7 +365,7 @@ namespace UAS_MES.Make
                                     {
                                     {
                                         CollectDataSonCode.Add(sp_soncode);
                                         CollectDataSonCode.Add(sp_soncode);
                                         SPID.Add(sp_id);
                                         SPID.Add(sp_id);
-                                        CollectData.Add(code.Text.Substring(0, code.Text.Length > 80 ? 80 : code.Text.Length));
+                                        CollectData.Add(code.Text.Substring(0, code.Text.Length > 200 ? 200 : code.Text.Length));
                                         sn_code.Text = code.Text;
                                         sn_code.Text = code.Text;
                                         OperateResult.AppendText(">>序列号" + code.Text + ",物料" + sp_soncode + "上料成功\n", Color.Green);
                                         OperateResult.AppendText(">>序列号" + code.Text + ",物料" + sp_soncode + "上料成功\n", Color.Green);
                                         RemainIndex = RemainIndex + 1;
                                         RemainIndex = RemainIndex + 1;
@@ -470,16 +470,16 @@ namespace UAS_MES.Make
             CollectDataSonCode.Add(sp_soncode);
             CollectDataSonCode.Add(sp_soncode);
             //采集成功提示
             //采集成功提示
 
 
-            CollectData.Add(code.Text.Substring(0, code.Text.Length > 80 ? 80 : code.Text.Length));
+            CollectData.Add(code.Text.Substring(0, code.Text.Length > 200 ? 200 : code.Text.Length));
             if (!CheckBarcode.ContainsKey(sp_fsoncode))
             if (!CheckBarcode.ContainsKey(sp_fsoncode))
             {
             {
-                CheckBarcode.Add(sp_fsoncode, code.Text.Substring(0, code.Text.Length > 80 ? 80 : code.Text.Length));
+                CheckBarcode.Add(sp_fsoncode, code.Text.Substring(0, code.Text.Length > 200 ? 200 : code.Text.Length));
             }
             }
             SPID.Add(sp_id);
             SPID.Add(sp_id);
             OperateResult.AppendText(">>物料" + sp_soncode + "采集成功,条码" + code.Text + "\n", Color.Green);
             OperateResult.AppendText(">>物料" + sp_soncode + "采集成功,条码" + code.Text + "\n", Color.Green);
             LabelDataGridView.Rows[RemainIndex].Cells["BarCode"].Value = code.Text;
             LabelDataGridView.Rows[RemainIndex].Cells["BarCode"].Value = code.Text;
-            if (code.Text.Length > 80)
-                OperateResult.AppendText(">>采集条码" + code.Text + "程度超过长度限制80,内容截取前80位进行采集\n", Color.Red);
+            if (code.Text.Length > 200)
+                OperateResult.AppendText(">>采集条码" + code.Text + "程度超过长度限制200,内容截取前200位进行采集\n", Color.Red);
             code.Clear();
             code.Clear();
             RemainIndex = RemainIndex + 1;
             RemainIndex = RemainIndex + 1;
             //如果+1后不小于B序列的长度,则已采集完成,不需要进行提示了
             //如果+1后不小于B序列的长度,则已采集完成,不需要进行提示了

+ 13 - 4
UAS-MES/FunctionCode/Make/Make_Repair.cs

@@ -282,6 +282,10 @@ namespace UAS_MES.Make
                             if (dt.Rows.Count > 0)
                             if (dt.Rows.Count > 0)
                             {
                             {
                                 cdstepcode = dt.Rows[0]["cm_stepcode"].ToString();
                                 cdstepcode = dt.Rows[0]["cm_stepcode"].ToString();
+                                OperatResult.AppendText(">>序列号:" + GetSNCode.Text + "未上料完成,不允许维修\n", Color.Red);
+                                BaseUtil.CleanForm(this);
+                                BadCodeTree.Nodes.Clear();
+                                return;
                             }
                             }
                             else
                             else
                             {
                             {
@@ -318,7 +322,7 @@ namespace UAS_MES.Make
                                 sql.Clear();
                                 sql.Clear();
                                 sql.Append("select cd_stepcode from craft left join craftdetail on cr_id =cd_crid where ");
                                 sql.Append("select cd_stepcode from craft left join craftdetail on cr_id =cd_crid where ");
                                 sql.Append("cr_code='" + cr_code.Text + "' and cr_prodcode='" + ms_prodcode.Text + "' and  ");
                                 sql.Append("cr_code='" + cr_code.Text + "' and cr_prodcode='" + ms_prodcode.Text + "' and  ");
-                                sql.Append("nvl(cd_ifburnin,0)<>0 and cd_detno <='" + currentdetno + "'");
+                                sql.Append("nvl(cd_ifcheckin,0)<>0 and cd_detno <='" + currentdetno + "' order by cd_detno");
                                 dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                                 dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                                 if (dt.Rows.Count > 0)
                                 if (dt.Rows.Count > 0)
                                 {
                                 {
@@ -569,7 +573,7 @@ namespace UAS_MES.Make
                     ErrorMessage += "【" + dt.Rows[i]["bc_name"].ToString() + "】";
                     ErrorMessage += "【" + dt.Rows[i]["bc_name"].ToString() + "】";
                 if (dt.Rows[i]["MBR_SOLUTIONCODE"].ToString() == "JJ_123")
                 if (dt.Rows[i]["MBR_SOLUTIONCODE"].ToString() == "JJ_123")
                 {
                 {
-                    if (dh.getRowCount("craftmaterial", "nvl(cm_mbid,0)<>0 and cm_sncode='" + GetSNCode.Text + "' or cm_firstsn='"+ firstsn + "' and cm_makecode='" + ms_makecode.Text + "'") == 0)
+                    if (dh.getRowCount("craftmaterial", "nvl(cm_mbid,0)<>0 and cm_sncode='" + GetSNCode.Text + "' or cm_firstsn='" + firstsn + "' and cm_makecode='" + ms_makecode.Text + "'") == 0)
                     {
                     {
                         OperatResult.AppendText(">>解决方案为更换物料,必须存在拆解记录\n", Color.Red);
                         OperatResult.AppendText(">>解决方案为更换物料,必须存在拆解记录\n", Color.Red);
                         return;
                         return;
@@ -803,6 +807,11 @@ namespace UAS_MES.Make
                 OperatResult.AppendText(">>解决方案不存在\n", Color.Red);
                 OperatResult.AppendText(">>解决方案不存在\n", Color.Red);
                 return;
                 return;
             }
             }
+            if (mb_badremark.Text == "")
+            {
+                OperatResult.AppendText(">>不良备注不允许为空\n", Color.Red);
+                return;
+            }
             //保存选择记录至后台,根据岗位资源代码记录
             //保存选择记录至后台,根据岗位资源代码记录
 
 
             dh.ExecuteSql("merge into DATAINPUTRECORD using (select NRG_NAME  from QUA_NGREASONGROUP where NRG_NAME = '" + nrg_name.Text + "') ON (NRG_NAME = DIR_COMMENT AND DIR_GROUP = '不良原因组' and DIR_SOURCECODE = '" + User.UserSourceCode + "') when matched then update set DIR_NUMBER = DIR_NUMBER +1 when not matched then insert (DIR_COMMENT,DIR_NUMBER,DIR_SOURCECODE,DIR_GROUP) VALUES (NRG_NAME,1,'" + User.UserSourceCode + "','不良原因组')", "select");
             dh.ExecuteSql("merge into DATAINPUTRECORD using (select NRG_NAME  from QUA_NGREASONGROUP where NRG_NAME = '" + nrg_name.Text + "') ON (NRG_NAME = DIR_COMMENT AND DIR_GROUP = '不良原因组' and DIR_SOURCECODE = '" + User.UserSourceCode + "') when matched then update set DIR_NUMBER = DIR_NUMBER +1 when not matched then insert (DIR_COMMENT,DIR_NUMBER,DIR_SOURCECODE,DIR_GROUP) VALUES (NRG_NAME,1,'" + User.UserSourceCode + "','不良原因组')", "select");
@@ -814,9 +823,9 @@ namespace UAS_MES.Make
             sql.Clear();
             sql.Clear();
             sql.Append("insert into makebadreason (mbr_mbid,mbr_id,mbr_brcode,mbr_solutioncode,");
             sql.Append("insert into makebadreason (mbr_mbid,mbr_id,mbr_brcode,mbr_solutioncode,");
             sql.Append("mbr_dutycode,mbr_brgcode,mbr_badcode,mbr_sncode,mbr_makecode,mbr_indate,");
             sql.Append("mbr_dutycode,mbr_brgcode,mbr_badcode,mbr_sncode,mbr_makecode,mbr_indate,");
-            sql.Append("mbr_inman,mbr_brname,mbr_solutionname,mbr_badname,mbr_brgname,mbr_dutyname,mbr_dutyman,mbr_dutymancode) select '" + mb_id + "','" + mbr_id + "','" + nr_code.Text + "',");
+            sql.Append("mbr_inman,mbr_brname,mbr_solutionname,mbr_badname,mbr_brgname,mbr_dutyname,mbr_dutyman,mbr_dutymancode,mbr_remark) select '" + mb_id + "','" + mbr_id + "','" + nr_code.Text + "',");
             sql.Append("'" + so_code.Text + "','" + mbr_dutyname.Text + "','" + nrg_code.Text + "','" + bc_code.Text + "',");
             sql.Append("'" + so_code.Text + "','" + mbr_dutyname.Text + "','" + nrg_code.Text + "','" + bc_code.Text + "',");
-            sql.Append("'" + ms_sncode.Text + "','" + ms_makecode.Text + "',sysdate,'" + User.UserCode + "','" + nr_name.Text + "','" + so_name.Text + "','" + bc_name.Text + "','" + nrg_name.Text + "','" + mbr_dutyname.Text + "','" + em_name.Text + "','" + em_code.Text + "' from dual");
+            sql.Append("'" + ms_sncode.Text + "','" + ms_makecode.Text + "',sysdate,'" + User.UserCode + "','" + nr_name.Text + "','" + so_name.Text + "','" + bc_name.Text + "','" + nrg_name.Text + "','" + mbr_dutyname.Text + "','" + em_name.Text + "','" + em_code.Text + "','" + mb_badremark.Text + "' from dual");
             dh.ExecuteSql(sql.GetString(), "insert");
             dh.ExecuteSql(sql.GetString(), "insert");
             if (mbc_component.Text != "")
             if (mbc_component.Text != "")
             {
             {

+ 21 - 21
UAS-MES/FunctionCode/Special/Special_Reset.cs

@@ -50,9 +50,9 @@ namespace UAS_MES.Special
         }
         }
 
 
         private void ReSN(string sncode, string stepcode)
         private void ReSN(string sncode, string stepcode)
-        {   
-            string stname = dh.getFieldDataByCondition("step", "st_name", "st_code = '" + stepcode +  "'").ToString();
-            dh.ExecuteSql("update makeserial set MS_STEPCODE = '',MS_CHECKNO = '', ms_status=1,ms_outboxcode='',ms_nextstepcode= '"+ stepcode + "' where ms_sncode='" + sncode + "' and ms_nextmacode is null", "update");
+        {
+            string stname = dh.getFieldDataByCondition("step", "st_name", "st_code = '" + stepcode + "'").ToString();
+            dh.ExecuteSql("update makeserial set MS_STEPCODE = '',MS_CHECKNO = '',ms_nextstepcode='', ms_status=1,ms_outboxcode='',ms_nextstepcode= '" + stepcode + "' where ms_sncode='" + sncode + "' ms_makecode='" + ms_makecode.Text + "'", "update");
             //if (checkBox1.Checked)
             //if (checkBox1.Checked)
             //{
             //{
             //    dh.ExecuteSql("update makeserial set ms_bs = '',ms_key='',ms_keyid='',MS_HARDWREID='',MS_KEYSTATEID='',MS_BIOS='',ms_ec='',ms_uuid='',MS_KEYPARTNUMBER='',ms_bt='',ms_mac='',ms_imei='' where ms_sncode = '" + sncode + "' and ms_makecode = '" + ms_makecode.Text + "'", "update");
             //    dh.ExecuteSql("update makeserial set ms_bs = '',ms_key='',ms_keyid='',MS_HARDWREID='',MS_KEYSTATEID='',MS_BIOS='',ms_ec='',ms_uuid='',MS_KEYPARTNUMBER='',ms_bt='',ms_mac='',ms_imei='' where ms_sncode = '" + sncode + "' and ms_makecode = '" + ms_makecode.Text + "'", "update");
@@ -65,14 +65,14 @@ namespace UAS_MES.Special
             sql.Append("cm_dropdate =sysdate,CM_REMARK = '重置站点拆解',cm_dropstep='" + User.CurrentStepCode + "',");
             sql.Append("cm_dropdate =sysdate,CM_REMARK = '重置站点拆解',cm_dropstep='" + User.CurrentStepCode + "',");
             sql.Append("cm_dropsccode='" + User.UserSourceCode + "' where cm_sncode = '" + sncode + "' and cm_stepcode in (select cd_stepcode from craftdetail left join step on st_code=cd_stepcode left join craft on cd_crid=cr_id where ST_STATUSCODE='AUDITED' and cr_code='" + cr_code.Text + "' and cr_prodcode='" + ms_prodcode.Text + "' and cd_detno >=" + cd_stepno.Text + " )");
             sql.Append("cm_dropsccode='" + User.UserSourceCode + "' where cm_sncode = '" + sncode + "' and cm_stepcode in (select cd_stepcode from craftdetail left join step on st_code=cd_stepcode left join craft on cd_crid=cr_id where ST_STATUSCODE='AUDITED' and cr_code='" + cr_code.Text + "' and cr_prodcode='" + ms_prodcode.Text + "' and cd_detno >=" + cd_stepno.Text + " )");
             dh.ExecuteSql(sql.GetString(), "update");
             dh.ExecuteSql(sql.GetString(), "update");
-            LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ms_makecode.Text, User.UserLineCode, User.UserSourceCode, "站点重置", "重置SN 备注:" + remark.Text + " 站点重置至" + stname,  sncode, "");
+            LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ms_makecode.Text, User.UserLineCode, User.UserSourceCode, "站点重置", "重置SN 备注:" + remark.Text + " 站点重置至" + stname, sncode, "");
         }
         }
 
 
 
 
 
 
         private void Split_Click(object sender, EventArgs e)
         private void Split_Click(object sender, EventArgs e)
         {
         {
-            if (sb.Count == 0|| cd_stepcode.Text == "")
+            if (sb.Count == 0 || cd_stepcode.Text == "")
             {
             {
                 OperatResult.AppendText(">>采集数与回流工位不能为空\n", Color.Red);
                 OperatResult.AppendText(">>采集数与回流工位不能为空\n", Color.Red);
                 return;
                 return;
@@ -89,13 +89,13 @@ namespace UAS_MES.Special
                 {
                 {
                     for (int i = 0; i < sb.Count; i++)
                     for (int i = 0; i < sb.Count; i++)
                     {
                     {
-                     ReSN(sb[i].ToString(), cd_stepcode.Text);
-                     OperatResult.AppendText("SN:" + sb[i].ToString()+ "回流至"+ cd_stepcode.Text + "完成\n", Color.Green);
+                        ReSN(sb[i].ToString(), cd_stepcode.Text);
+                        OperatResult.AppendText("SN:" + sb[i].ToString() + "回流至" + cd_stepcode.Text + "完成\n", Color.Green);
                     }
                     }
                     WeighRecord.Items.Clear();
                     WeighRecord.Items.Clear();
                     sb.Clear();
                     sb.Clear();
                 }
                 }
-                else if(bigboxBtn.Checked)
+                else if (bigboxBtn.Checked)
                 {
                 {
                     string stname = dh.getFieldDataByCondition("step", "st_name", "st_code = '" + cd_stepcode.Text + "'").ToString();
                     string stname = dh.getFieldDataByCondition("step", "st_name", "st_code = '" + cd_stepcode.Text + "'").ToString();
                     for (int i = 0; i < sb.Count; i++)
                     for (int i = 0; i < sb.Count; i++)
@@ -105,10 +105,10 @@ namespace UAS_MES.Special
                         {
                         {
                             ReSN(dt2.Rows[k]["ms_sncode"].ToString(), cd_stepcode.Text);
                             ReSN(dt2.Rows[k]["ms_sncode"].ToString(), cd_stepcode.Text);
                         }
                         }
-                       dh.ExecuteSql("insert into PACKAGEBACKUP select * from package where pa_outboxcode='" + sb[i].ToString() + "'", "insert");
-                       dh.ExecuteSql("insert into PACKAGEBACKUPDETAIL select * from packagedetail where pd_outboxcode='" + sb[i].ToString() + "'", "insert");
-                       dh.ExecuteSql("delete from package where pa_outboxcode = '" + sb[i].ToString() + "'", "delete");
-                       dh.ExecuteSql("delete from LABELPRINTLOG where lpl_value = '" + sb[i].ToString() + "'", "delete");
+                        dh.ExecuteSql("insert into PACKAGEBACKUP select * from package where pa_outboxcode='" + sb[i].ToString() + "'", "insert");
+                        dh.ExecuteSql("insert into PACKAGEBACKUPDETAIL select * from packagedetail where pd_outboxcode='" + sb[i].ToString() + "'", "insert");
+                        dh.ExecuteSql("delete from package where pa_outboxcode = '" + sb[i].ToString() + "'", "delete");
+                        dh.ExecuteSql("delete from LABELPRINTLOG where lpl_value = '" + sb[i].ToString() + "'", "delete");
                         //删除箱的明细
                         //删除箱的明细
                         dh.ExecuteSql("delete from packagedetail where pd_outboxcode='" + sb[i].ToString() + "'", "delete");
                         dh.ExecuteSql("delete from packagedetail where pd_outboxcode='" + sb[i].ToString() + "'", "delete");
                         LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ms_makecode.Text, User.UserLineCode, User.UserSourceCode, "站点重置", "重置箱 备注:" + remark.Text + " 站点重置至" + stname, sb[i].ToString(), "");
                         LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ms_makecode.Text, User.UserLineCode, User.UserSourceCode, "站点重置", "重置箱 备注:" + remark.Text + " 站点重置至" + stname, sb[i].ToString(), "");
@@ -123,7 +123,7 @@ namespace UAS_MES.Special
                     sb.Clear();
                     sb.Clear();
                 }
                 }
                 else if (oqcBtn.Checked)
                 else if (oqcBtn.Checked)
-                { 
+                {
                     string stname = dh.getFieldDataByCondition("step", "st_name", "st_code = '" + cd_stepcode.Text + "'").ToString();
                     string stname = dh.getFieldDataByCondition("step", "st_name", "st_code = '" + cd_stepcode.Text + "'").ToString();
                     for (int i = 0; i < sb.Count; i++)
                     for (int i = 0; i < sb.Count; i++)
                     {
                     {
@@ -140,7 +140,7 @@ namespace UAS_MES.Special
                 }
                 }
                 sql.Clear();
                 sql.Clear();
                 sql.Append("MERGE INTO makecraftdetail USING (select mcd_macode,mcd_detno,mcd_stepcode,mcd_stepname,nvl(count(distinct A.ms_sncode),0) n,nvl(count(distinct B.ms_sncode),0) bn,(select nvl(count(distinct sp_sncode),0) from STEPPASSED where SP_MAKECODE = mcd_macode AND SP_STEPCODE = mcd_stepcode) inqty from MAKECRAFTdetail");
                 sql.Append("MERGE INTO makecraftdetail USING (select mcd_macode,mcd_detno,mcd_stepcode,mcd_stepname,nvl(count(distinct A.ms_sncode),0) n,nvl(count(distinct B.ms_sncode),0) bn,(select nvl(count(distinct sp_sncode),0) from STEPPASSED where SP_MAKECODE = mcd_macode AND SP_STEPCODE = mcd_stepcode) inqty from MAKECRAFTdetail");
-                sql.Append(" left join makeserial A on mcd_macode = A.ms_makecode and mcd_stepcode = A.ms_nextstepcode AND A.MS_STATUS = 1 LEFT JOIN MAKESERIAL B ON mcd_macode = B.ms_makecode AND MCD_STEPCODE = B.MS_STEPCODE AND B.MS_STATUS = 3 where mcd_macode = '"+ ms_makecode.Text + "'  group by mcd_macode,mcd_detno, mcd_stepcode, mcd_stepname order by mcd_detno asc) A");
+                sql.Append(" left join makeserial A on mcd_macode = A.ms_makecode and mcd_stepcode = A.ms_nextstepcode AND A.MS_STATUS = 1 LEFT JOIN MAKESERIAL B ON mcd_macode = B.ms_makecode AND MCD_STEPCODE = B.MS_STEPCODE AND B.MS_STATUS = 3 where mcd_macode = '" + ms_makecode.Text + "'  group by mcd_macode,mcd_detno, mcd_stepcode, mcd_stepname order by mcd_detno asc) A");
                 sql.Append(" ON (makecraftdetail.MCD_MACODE = A.MCD_MACODE and makecraftdetail.mcd_stepcode = A.mcd_stepcode)  ");
                 sql.Append(" ON (makecraftdetail.MCD_MACODE = A.MCD_MACODE and makecraftdetail.mcd_stepcode = A.mcd_stepcode)  ");
                 sql.Append(" WHEN MATCHED THEN UPDATE SET makecraftdetail.mcd_inqty = A.inqty,makecraftdetail.mcd_outqty = A.inqty,makecraftdetail.mcd_okqty = A.inqty ");
                 sql.Append(" WHEN MATCHED THEN UPDATE SET makecraftdetail.mcd_inqty = A.inqty,makecraftdetail.mcd_outqty = A.inqty,makecraftdetail.mcd_okqty = A.inqty ");
                 dh.ExecuteSql(sql.GetString(), "update");
                 dh.ExecuteSql(sql.GetString(), "update");
@@ -159,12 +159,12 @@ namespace UAS_MES.Special
                     //string logout_confirm = MessageBox.Show(this.ParentForm, "是否更换采集项(已录入信息会清空)?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question).ToString();
                     //string logout_confirm = MessageBox.Show(this.ParentForm, "是否更换采集项(已录入信息会清空)?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question).ToString();
                     //if (logout_confirm == "Yes")
                     //if (logout_confirm == "Yes")
                     //{
                     //{
-                        WeighRecord.Items.Clear();
-                        sb.Clear();
-                        ms_makecode.Text = "";
-                        ms_prodcode.Text = "";
-                        cr_code.Text = "";
-                        cd_stepcode.Text = "";
+                    WeighRecord.Items.Clear();
+                    sb.Clear();
+                    ms_makecode.Text = "";
+                    ms_prodcode.Text = "";
+                    cr_code.Text = "";
+                    cd_stepcode.Text = "";
                     //}
                     //}
                     //else
                     //else
                     //{
                     //{
@@ -238,7 +238,7 @@ namespace UAS_MES.Special
                 }
                 }
                 else if (bigboxBtn.Checked)
                 else if (bigboxBtn.Checked)
                 {
                 {
-                    dt = (DataTable)dh.ExecuteSql("select pd_makecode ms_makecode,pd_prodcode ms_prodcode,pa_outboxcode,pa_mothercode,ma_craftcode cr_code from package left join packagedetail on pa_outboxcode = pd_outboxcode left join make on pd_makecode = ma_code where pa_outboxcode = '" + input.Text+"' and pa_type = '1'", "select");
+                    dt = (DataTable)dh.ExecuteSql("select pd_makecode ms_makecode,pd_prodcode ms_prodcode,pa_outboxcode,pa_mothercode,ma_craftcode cr_code from package left join packagedetail on pa_outboxcode = pd_outboxcode left join make on pd_makecode = ma_code where pa_outboxcode = '" + input.Text + "' and pa_type = '1'", "select");
                     if (dt.Rows.Count > 0)
                     if (dt.Rows.Count > 0)
                     {
                     {
                         if (ms_makecode.Text != "" && dt.Rows[0]["ms_makecode"].ToString() != ms_makecode.Text)
                         if (ms_makecode.Text != "" && dt.Rows[0]["ms_makecode"].ToString() != ms_makecode.Text)