Epicor C#从按钮打开文件夹

时间:2016-02-08 21:01:21

标签: c# button customization attachment epicorerp

我想从Epicor表单中提取的记录中打开一个文件夹。我创建了一个按钮,到目前为止它打开了根文件夹,但是我希望它转到一个子文件夹,其中记录的名称是当新记录是从SQL存储过程创建的子文件夹时创建

这是我到目前为止所做的:

    private void epiButtonC1_Click(object sender, System.EventArgs args)
{
    // ** Place Event Handling Code Here **
    string folder = "\\\\MasterServ\\Shared\\Customer Attachments\\";
    Process.Start("IExplore.exe", folder);
}

我知道需要在位置的末尾添加一些内容来使用记录来调用文件夹,但我不确定是什么。

1 个答案:

答案 0 :(得分:0)

当试图从Epicor中的控件中获取数据时,一般来说,您想要转到EpiDataView来获取值而不是控件本身。表单中有多个抽象层,使控制处理变得困难。

从您的评论示例中我会这样做。代码未经测试,所以希望我没有做错字。

EpiDataView edvUD104 = ((EpiDataView)(oTrans.EpiDataViews["UD104"]));
if (edvUD104.HasRow)
{
   string folder = "\\\\MasterServ\\Shared\\Customer Attachments\\" 
                  + edvUD104.dataView[edvUD104.Row]["Key1"].ToString();
   Process.Start("IExplore.exe", folder);
}

为可读性而编辑。