예제 #1
0
        /// <summary>
        /// 加载
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        public override void btnLoad_Click(object sender, EventArgs e)
        {
            try
            {
                if (HTFormStatus == FormStatus.新增 || HTFormStatus == FormStatus.修改)
                {
                    if (Common.CheckSearchLookUpEditBlank(drpVendorID))
                    {
                        this.ShowMessage("请选择" + lblVendor.Text.ToString());
                        return;
                    }
                    if (SysConvert.ToInt32(drpDZType.EditValue) == 0)
                    {
                        this.ShowMessage("请选择开票类型");
                        return;
                    }

                    frmLoadIOForm frm = new frmLoadIOForm();
                    frm.DZTypeID    = SysConvert.ToInt32(drpDZType.EditValue);
                    frm.InvoiceFlag = 1;
                    string tempConditionStr = " AND ISNULL(DZFlag,0)=1" + " AND VendorID=" + SysString.ToDBString(SysConvert.ToString(drpVendorID.EditValue));
                    tempConditionStr      += " AND  ABS(ISNULL(InvoiceQty,0))<>ISNULL(Qty,0) ";
                    tempConditionStr      += " AND ABS(ISNULL(DZQty,0))>ABS(ISNULL(InvoiceQty,0))";
                    frm.HTLoadConditionStr = tempConditionStr;//只查询已对账 及还有未开票部分数据


                    frm.ShowDialog();
                    string str = string.Empty;
                    if (frm.DtsID != null && frm.DtsID.Length != 0)
                    {
                        for (int i = 0; i < frm.DtsID.Length; i++)
                        {
                            if (str != string.Empty)
                            {
                                str += ",";
                            }
                            str += SysConvert.ToString(frm.DtsID[i]);
                        }
                        setItemNews(str);
                    }
                }
            }
            catch (Exception E)
            {
                this.ShowMessage(E.Message);
            }
        }
예제 #2
0
 /// <summary>
 /// 加载
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 public void btnLoadWH_Click(object sender, EventArgs e)
 {
     try
     {
         if (HTFormStatus == FormStatus.新增 || HTFormStatus == FormStatus.修改)
         {
             if (SysConvert.ToString(drpVendorID.EditValue) == "")
             {
                 this.ShowMessage("请选择单位");
                 drpVendorID.Focus();
                 return;
             }
             frmLoadIOForm frm = new frmLoadIOForm();
             frm.DZTypeID = (int)EnumDZType.销售;
             string tempConditionStr = " AND VendorID=" + SysString.ToDBString(SysConvert.ToString(drpVendorID.EditValue));
             tempConditionStr      += " AND  ABS(ISNULL(InvoiceQty,0))<>ISNULL(Qty,0) ";
             frm.HTLoadConditionStr = tempConditionStr;//只查询未开票部分数据
             frm.ShowDialog();
             string str = string.Empty;
             if (frm.DtsID != null && frm.DtsID.Length != 0)
             {
                 for (int i = 0; i < frm.DtsID.Length; i++)
                 {
                     if (str != string.Empty)
                     {
                         str += ",";
                     }
                     str += SysConvert.ToString(frm.DtsID[i]);
                 }
                 setItemByWH(str);
             }
         }
     }
     catch (Exception E)
     {
         this.ShowMessage(E.Message);
     }
 }
예제 #3
0
        /// <summary>
        /// 加载
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        public override void btnLoad_Click(object sender, EventArgs e)
        {
            try
            {
                if (HTFormStatus == FormStatus.新增 || HTFormStatus == FormStatus.修改)
                {
                    if (Common.CheckSearchLookUpEditBlank(drpVendorID))
                    {
                        this.ShowMessage("请选择" + lblVendor.Text.ToString());
                        return;
                    }
                    string str = string.Empty;
                    //if (SysConvert.ToInt32(drpDZType.EditValue) == 0)
                    //{
                    //    this.ShowMessage("请选择对账类型");
                    //    return;
                    //}
                    if (this.FormListAID == 3 && IsMerge == 1)
                    {
                        frmLoadIOFormTotal frm = new frmLoadIOFormTotal();
                        frm.DZTypeID = SysConvert.ToInt32(drpDZType.EditValue);
                        frm.DZFlag   = 1;                                                                                                                                                                   //对账加载仓库单据
                        ///未对账或者对账数量不等于仓库数量
                        frm.HTLoadConditionStr = " AND (ISNULL(DZFlag,0)=0 OR ABS(ISNULL(DZQty,0))<>ISNULL(Qty,0) )" + " AND VendorID=" + SysString.ToDBString(SysConvert.ToString(drpVendorID.EditValue)); //只查询未对账


                        frm.ShowDialog();
                        if (frm.DtsID != null && frm.DtsID.Length != 0)
                        {
                            for (int i = 0; i < frm.DtsID.Length; i++)
                            {
                                if (str != string.Empty)
                                {
                                    str += ",";
                                }
                                str += SysConvert.ToString(frm.DtsID[i]);
                            }
                            setItemTotalNews(str);
                        }
                        return;
                    }
                    frmLoadIOForm frm2 = new frmLoadIOForm();
                    frm2.DZTypeID = SysConvert.ToInt32(drpDZType.EditValue);
                    frm2.DZFlag   = 1;                                                                                                                                                   //对账加载仓库单据
                    ///未对账或者对账数量不等于仓库数量
                    frm2.HTLoadConditionStr = " AND (ISNULL(DZFlag,0)=0 OR ISNULL(NoDZQty,0)<>0)" + " AND VendorID=" + SysString.ToDBString(SysConvert.ToString(drpVendorID.EditValue)); //只查询未对账


                    frm2.ShowDialog();
                    if (frm2.DtsID != null && frm2.DtsID.Length != 0)
                    {
                        for (int i = 0; i < frm2.DtsID.Length; i++)
                        {
                            if (str != string.Empty)
                            {
                                str += ",";
                            }
                            str += SysConvert.ToString(frm2.DtsID[i]);
                        }
                        setItemNews(str);
                    }
                }
            }
            catch (Exception E)
            {
                this.ShowMessage(E.Message);
            }
        }