/// <summary>
 /// չʾ����
 /// </summary>
 /// <param name="id">��¼Id</param>
 private void ShowInfo(int id)
 {
     SFileBB fileBB = new SFileBB();
     LMessageBB messageBB = new LMessageBB();
     vLMessageData model = new vLMessageData();
     try
     {
         model = messageBB.GetVModel(id);
         this.title.Text = model.title;
         this.content.Text = model.content;
         this.fileId.Text = fileBB.GetDownBatchFileNm(model.fileId);
         this.sort.Text = model.sortNm;
         this.author.Text = model.author;
     }
     finally
     {
         fileBB.Dispose();
         messageBB.Dispose();
     }
     //�����Ѷ��˴�
     SCommBB commBB = new SCommBB();
     try
     {
         string strSql = "select count(distinct empId) from LMessageReaded where messageId=" + id.ToString();
         this.readedEmpCount.Text = commBB.ExecuteScalar(strSql).ToString();
     }
     finally
     {
         commBB.Dispose();
     }
 }
Beispiel #2
0
    public void FinishTSArriveDetail(int arriveDetailId)
    {
        BArriveDetailBB arriveDetailBB = new BArriveDetailBB();
        SCommBB commBB = new SCommBB();

        try
        {
            BArriveDetailData arriveDetailModel = new BArriveDetailData();
            object obj = null;
            string strArriveBillNo = "", strFinanceBillNo = "", strMaterialNo = "";

            arriveDetailModel = arriveDetailBB.GetModel(arriveDetailId);
            arriveDetailModel.isFinishReceive = true;//收货完成

            arriveDetailBB.ModifyRecord(arriveDetailModel);

            //更改到货单明细的排托数量
            strArriveBillNo = arriveDetailModel.arriveBillNo;
            strFinanceBillNo = arriveDetailModel.financeBillNo;
            strMaterialNo = arriveDetailModel.materialNo;

            obj = commBB.ExecuteScalar("select count(1) from dbo.BArrangeBillBox where arriveBillNo='"
                + strArriveBillNo + "' and financeBillNo='" + strFinanceBillNo + "' and materialNo='" + strMaterialNo + "'");
            if (obj != null)
            {
                commBB.ExecuteSql("update dbo.BarriveDetail set boxNum=" + obj.ToString() + " where id=" + arriveDetailId.ToString());
            }
        }
        finally
        {
            arriveDetailBB.Dispose();
            commBB.Dispose();
        }
    }
Beispiel #3
0
 public string GetWareLocatorCheckMatertial(string checkNO, string wareLocatorNo,string material)
 {
     SCommBB commBB = new SCommBB();
     object obj = commBB.ExecuteScalar("Select distinct WareLocatorNo from UStockCheckDetail_Joey  where StockCheckBillNo = '" + checkNO + "' and WareLocatorNo = '" + wareLocatorNo + "' and  MaterialNo ='"+material+"'");
     if (obj == null)
     {
         return "";
     }
     else
     {
         return obj.ToString();
     }
 }
Beispiel #4
0
    public string GetfirstSingleWeight(string material)
    {
        SCommBB commBB = new SCommBB();
        try
        {
            string singleWeight = "";

            object obj = commBB.ExecuteScalar("SELECT U_StanWiht FROM LMaterial  WHERE materialNo ='" + material + "'").ToString();
            if (obj != null)
            {
                singleWeight = obj.ToString();
            }
            else
            {
                singleWeight = "0";
            }
            return singleWeight;
        }
        finally
        {
            commBB.Dispose();
        }
    }
Beispiel #5
0
    public string GetcustNo(string palletNo)
    {
        SCommBB commBB = new SCommBB();
        string custNO = "";
        string command = @"exec [dbo].[pro_GetcustNo] '" + palletNo + "'";
        try
        {
            object obj = commBB.ExecuteScalar(command);
            if (obj != null)
            {
                custNO = obj.ToString();
            }
        }
        catch
        {
            custNO = "";
        }

        finally
        {
            commBB.Dispose();

        }
        return custNO;
    }
    /// <summary>
    /// 删除备货单
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void btnDelete_Click(object sender, EventArgs e)
    {
        foreach (GridViewRow gvrow in this.grid.Rows)
        {
            CheckBox chkId = (CheckBox)gvrow.FindControl("chkId");
            if (chkId.Checked == true)
            {
                string id = this.grid.DataKeys[gvrow.RowIndex].Values["id"].ToString();

                CStockUpBillBB billBB = new CStockUpBillBB();

                CStockUpBillData data = billBB.GetModel(Convert.ToInt32(id));
                string stockUpBillNo = data.stockUpBillNo;//获取要删除的备货单号

                SCommBB commBB = new SCommBB();
                object returnValue =commBB.ExecuteScalar(@"select top 1 stockUpBillNo from CPickOutPlan where stockUpBillNo = '"+stockUpBillNo+"' and instantState<>'01'");
                if (returnValue != null)
                {
                    this.ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert(\"备货单  " + stockUpBillNo + " 不允许删除因为已经开始执行!\");", true);
                    return;
                }
                else
                {
                    try
                    {
                        commBB.ExecuteSql("Exec [DeleteStockUpBillNo] '" + stockUpBillNo + "'");
                        this.ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert(\"备货单  " + stockUpBillNo + " 删除错误删除成功!\");", true);
                    }
                    catch (Exception error)
                    {
                        this.ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert(\"备货单  " + stockUpBillNo + " 删除错误" + error.Message + "!\");", true);
                    }
                    finally
                    {
                        commBB.Dispose();
                    }
                }

            }
        }
    }