本文解答了关于《当期损益金额计算方法》相关内容,同时关于1、当期损益金额计算方法有哪些,2、当期损益金额计算方法是什么,3、当期损益金额怎么算,4、当期损益的金额,5、当期损益怎么求,的相关问答本篇文章福途教育网小编也整理了进来,希望对您有帮助。
当期损益金额计算方法
public static string[] GetCurrentProfitAmount(string pZIds, string pYear, string pMonth)
{
try
{
double Sum = 0;
string[] para = { pZIds, pYear, pMonth };
DataTable dt = SqlHelper.ExecuteDataTableProc("Pr_B_GetCurrentProfitAmount", para);
if (dt.Rows.Count > 0)
{
foreach (DataRow dr in dt.Rows)
Sum = Sum + Double.Parse(dr["TotalMoney"].ToString());
if (Sum > 0)
return new string[] { "0", Sum.ToString("#0.00") };
else
return new string[] { Math.Abs(Sum).ToString("#0.00"), "0" };
}
else
return new string[] { "0", "0" };
}
catch (Exception ex)
{
PAEEEM.Log_Erros_Output.OutputLog(ex, "GetCurrentProfitAmount");
return new string[] { "0", "0" };
}
}
//Apl信息
public static DataTable GetAplInformationByZId(int pZId)
{
try
{
string[] para = { pZId.ToString() };
return SqlHelper.ExecuteDataTableProc("Pr_B_GetAplInformationByZId", para);
}
catch (Exception ex)
{
PAEEEM.Log_Erros_Output.OutputLog(ex, "GetAplInformationByZId");
return null;
}
}
#endregion
#region 根据DISTRIBUIDOR获得有BALANCE的时间
///
/// 单价表月份
///
public static DataTable GetTimaByDistrib(string distribuidor)
{
try
{
SqlParameter[] para = new SqlParameter[]
{
new SqlParameter("@Distribuidor",SqlDbType.VarChar)
};
para[0].Value = distribuidor;
DataTable dt = SqlHelper.ExecuteDataTable(CommandType.StoredProcedure, "Pr_B_GetTimaByDistrib", para);
return dt;
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region 根据单价表月份获得单价列表
public static DataTable GetPrcByTima(string Tima)
{
try
{
SqlParameter[] para = new SqlParameter[]
{
new SqlParameter("@Tima",SqlDbType.VarChar)
};
para[0].Value = Tima;
DataTable dt = SqlHelper.ExecuteDataTable(CommandType.StoredProcedure, "Pr_B_GetPrcByTima", para);
return dt;
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
}
}
总结:以上是编辑:【孔飘】整理及AI智能原创关于《当期损益金额计算方法
》优质内容解答希望能帮助到您。