else
Kcheck=false;
}
if(Kcheck==true)
{
Index1=app->single.GetYaoNum(3);
while(Index1--)
{
if(app->single.GetYao(Index1,3)->YName==m_Name)
{
MessageBox("列表中已经有该项了");
Jin=false;
}
}
if(Jin==true)
{
app->single.AddYao(m_Name,m_Kind,m_Number,m_Price,3);
int temp=atoi(app->single.GetYao(JiShu,2)->YNumber)-atoi(m_Number);//修改退货列表
app->single.GetYao(JiShu,2)->YNumber.Format("%d",temp);
Index1=app->single.GetYaoNum(1);
while(Index1--)
{
if(app->single.GetYao(Index1,1)->YName==m_Name)
{
int temp1=atoi(app->single.GetYao(Index1,1)->YNumber)+atoi(m_Number);//修改库存
www.youerw.com
m_Money.Format("%d",atoi(m_Number)*atoi(m_Price));
UpdateData(false);
}
int Index;
Index=app->single.GetYaoNum(3);
m_BackList.ResetContent(); //列表清空
for(int i=0;i<Index;i++) //逐条加入信息
{
m_BackList.AddString(app->single.GetYao(i,3)->YName);
}
}
else
MessageBox("销售列表中没有此货物");
}
MessageBox("销售列表中还没有货物");
}
}
void Back::OnButcheck()
{
int Index;
CMedManageApp *app = (CMedManageApp *)AfxGetApp();
Index=app->single.GetYaoNum(3);
m_BackList.ResetContent(); //列表清空
for(int i=0;i<Index;i++) //逐条加入信息
{
m_BackList.AddString(app->single.GetYao(i,3)->YName);
}
}void Back::OnSelchangeList1()
{
CMedManageApp *app = (CMedManageApp *)AfxGetApp();
int nIndex=m_BackList.GetCurSel();
if(nIndex!=LB_ERR)
{
m_Name=app->single.GetYao(nIndex,3)->YName;
m_Kind=app->single.GetYao(nIndex,3)->YKind;
m_Number=app->single.GetYao(nIndex,3)->YNumber;
m_Price=app->single.GetYao(nIndex,3)->YPrice;
上一页 [1] [2] [3] [4] [5] [6] [7] [8] 下一页