本文整理汇总了C#中SAPbouiCOM.Matrix类的典型用法代码示例。如果您正苦于以下问题:C# Matrix类的具体用法?C# Matrix怎么用?C# Matrix使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Matrix类属于SAPbouiCOM命名空间,在下文中一共展示了Matrix类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ET_mtx1_DUMY_BFValidate
public virtual bool ET_mtx1_DUMY_BFValidate(ItemEvent pVal)
{
oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
oMatrix = ((SAPbouiCOM.Matrix)(oForm.Items.Item("mtx1_DUMY").Specific));
// ADD YOUR ACTION CODE HERE ...
return true;
}
示例2: ET_mtx2_DUMY_AFDoubleClick
public virtual void ET_mtx2_DUMY_AFDoubleClick(ItemEvent pVal)
{
oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
oMatrix = ((SAPbouiCOM.Matrix)(oForm.Items.Item("mtx2_DUMY").Specific));
// ADD YOUR ACTION CODE HERE ...
string sTYPE = "";
try
{
if (pVal.Row != 0)
{
//접수자ID 와 로그인 ID 가 다를경우 접수내용 수정 불가
oMatrix.FlushToDataSource();
if ((oMatrix.GetCellSpecific("U_RECVID", pVal.Row).Value.Trim() == B1Connections.diCompany.UserName.ToString()) && (sFindTY == "F"))
{ sTYPE = "TRUE"; }
else { sTYPE = "FASLE"; }
oDB_M = oForm.DataSources.DBDataSources.Item("@KIS_SO0030M_HRD");
string extCOM = ((SAPbouiCOM.EditText)oMatrix.GetCellSpecific("U_MEMO", pVal.Row)).Value.Trim();
string strChildFormID = oForm.DataSources.UserDataSources.Item("cFORMUID2").Value;
if (!FN.GetFormExistsChk(strChildFormID))
{
KIS_SO0033A_HRD SO0033A_HRD = new KIS_SO0033A_HRD();
SO0033A_HRD.A00_SubFormInit(oForm.UniqueID, pVal.Row, extCOM, "접수내용", "CallBack", sTYPE);
SO0033A_HRD = null;
}
else
{
SAPbouiCOM.Form pForm = pForm = B1Connections.theAppl.Forms.Item(strChildFormID);
KIS_SO0033A_HRD.extSetting(pForm, extCOM, pVal.Row);
pForm.Select();
pForm = null;
}
}
}
catch (Exception)
{
throw;
}
}
示例3: SetSystemDataTable
//.........这里部分代码省略.........
oDB1_Z.InsertRecord(i);
oDB1_Z.SetValue("U_NO", i, (i + 1).ToString());//"번호";
oDB1_Z.SetValue("U_IDX", i, (i).ToString());//"DataTable 고유ID";
oDB1_Z.SetValue("LineId", i, oDB1_O.GetValue("LineId", i));//"원본라인번호";
oDB1_Z.SetValue("U_DELVCD", i, oDB1_O.GetValue("U_DELVCD", i).Trim()); //"배달코드";
oDB1_Z.SetValue("U_RDEPT", i, oDB1_O.GetValue("U_RDEPT", i).Trim()); //"부서";
oDB1_Z.SetValue("U_PAPERTP", i, oDB1_O.GetValue("U_PAPERTP", i).Trim()); //"지종";
oDB1_Z.SetValue("U_PAYCD", i, oDB1_O.GetValue("U_PAYCD", i).Trim()); //"요금제코드";
oDB1_Z.SetValue("U_PAYNM", i, oDB1_O.GetValue("U_PAYNM", i).Trim()); //"요금제명";
oDB1_Z.SetValue("U_TEL", i, oDB1_O.GetValue("U_TEL", i).Trim()); //"연락처";
oDB1_Z.SetValue("U_MOBILE", i, oDB1_O.GetValue("U_MOBILE", i).Trim()); //"휴대폰";
oDB1_Z.SetValue("U_ADDR1", i, oDB1_O.GetValue("U_ADDR1", i).Trim()); //"주소1";
oDB1_Z.SetValue("U_ADDR2", i, oDB1_O.GetValue("U_ADDR2", i).Trim()); //"주소2";
oDB1_Z.SetValue("U_ADDR1_D", i, oDB1_O.GetValue("U_ADDR1_D", i).Trim()); //"주소1";
oDB1_Z.SetValue("U_ADDR2_D", i, oDB1_O.GetValue("U_ADDR2_D", i).Trim()); //"주소2";
oDB1_Z.SetValue("U_CENTCD", i, oDB1_O.GetValue("U_CENTCD", i).Trim()); //"지국";
oDB1_Z.SetValue("U_CENTNM", i, oDB1_O.GetValue("U_CENTNM", i).Trim()); //"지국명";
oDB1_Z.SetValue("U_DELVFR", i, oDB1_O.GetValue("U_DELVFR", i).Trim()); //"배달시작일";
oDB1_Z.SetValue("U_DELVTO", i, oDB1_O.GetValue("U_DELVTO", i).Trim()); //"배달종료일";
oDB1_Z.SetValue("U_DELVCNT", i, oDB1_O.GetValue("U_DELVCNT", i).Trim()); //"배달부수";
oDB1_Z.SetValue("U_METHOD", i, oDB1_O.GetValue("U_METHOD", i).Trim()); //"가입방법";
oDB1_Z.SetValue("U_SAILCD", i, oDB1_O.GetValue("U_SAILCD", i).Trim()); //"유치자";
oDB1_Z.SetValue("U_SAILNM", i, oDB1_O.GetValue("U_SAILNM", i).Trim()); //"유치자";
oDB1_Z.SetValue("U_STATUS", i, oDB1_O.GetValue("U_STATUS", i).Trim()); //"배달상태";
oDB1_Z.SetValue("U_SDEPT", i, oDB1_O.GetValue("U_SDEPT", i).Trim()); //"유치부서";
oDB1_Z.SetValue("U_NOTE", i, oDB1_O.GetValue("U_NOTE", i).Trim()); //"배달상세";
oDB1_Z.SetValue("U_JOINDT", i, oDB1_O.GetValue("U_JOINDT", i).Trim()); //"가입일자";
oDB1_Z.SetValue("U_CLOSEDT", i, oDB1_O.GetValue("U_CLOSEDT", i).Trim()); //"해지일자";
oDB1_Z.SetValue("U_USERSG1", i, oDB1_O.GetValue("U_USERSG1", i).Trim()); //"등록자";
oDB1_Z.SetValue("U_READTP", i, oDB1_O.GetValue("U_READTP", i).Trim()); //"등록자";
oDB1_Z.SetValue("U_BTEL1", i, oDB1_O.GetValue("U_BTEL1", i).Trim()); //"분국전화1";
oDB1_Z.SetValue("U_BTEL2", i, oDB1_O.GetValue("U_BTEL2", i).Trim()); //"분국전화2";
}
}
//if (gDs.Tables[oForm.UniqueID + "_Call"] != null)
// gDs.Tables[oForm.UniqueID + "_Call"].Clear();
//else
// gDs.Tables[oForm.UniqueID + "_Call"] = SetParameterDataTableSchema(oForm.UniqueID+"Call");
if (gDs.Tables.Contains(oForm.UniqueID + "_Call"))
{
gDs.Tables[oForm.UniqueID + "_Call"].Rows.Clear();
}
else
{
System.Data.DataTable dt = SetParameterDataTableSchema(oForm.UniqueID + "_Call");
gDs.Tables.Add(dt);
}
if (oDB2_O.Size > 0 && oDB2_O.GetValue("U_DELVCD", 0).ToString().Trim() != "")
{
for (int i = 0; i < oDB2_O.Size; i++)
{
System.Data.DataRow dr;
// 데이터 필터를 위해 DataTable에 담는다.
dr = gDs.Tables[oForm.UniqueID + "_Call"].NewRow();
dr["IDX"] = i; //"DataTable 고유ID";
dr["LINEID"] = oDB2_O.GetValue("LineId", i);//"원본라인번호";
dr["DELVCD"] = oDB2_O.GetValue("U_DELVCD", i).Trim(); //"배달코드"
dr["CALLTP"] = oDB2_O.GetValue("U_CALLTP", i).Trim(); //"콜유형"
dr["MEMO"] = oDB2_O.GetValue("U_MEMO", i).Trim(); //"접수내용"
dr["RECVID"] = oDB2_O.GetValue("U_RECVID", i).Trim(); //"접수자ID"
dr["RECVNM"] = oDB2_O.GetValue("U_RECVNM", i).Trim(); //"접수자명"
dr["RECVDT"] = oDB2_O.GetValue("U_RECVDT", i).Trim(); //"접수일자"
dr["RECVTI"] = oDB2_O.GetValue("U_RECVTI", i).Trim(); //"접수시간"
dr["RECVTI"] = oDB2_O.GetValue("U_RECVTI", i).Trim(); //"접수시간"
dr["PROCID"] = oDB2_O.GetValue("U_PROCID", i).Trim(); //"처리자ID"
dr["PROCNM"] = oDB2_O.GetValue("U_PROCNM", i).Trim(); //"처리자명"
dr["PROCDT"] = oDB2_O.GetValue("U_PROCDT", i).Trim(); //"처리일자"
dr["PROSTAT"] = oDB2_O.GetValue("U_PROSTAT", i).Trim(); //"처리상태"
dr["ROWSTATE"] = ""; // 기본: "", 수정: M, 신규: I, 삭제: D
gDs.Tables[oForm.UniqueID + "_Call"].Rows.Add(dr);
}
}
//else
//{
// gDs.Tables[oForm.UniqueID + "_Call"].Rows.Clear();
//}
oMatrix = (SAPbouiCOM.Matrix)oForm.Items.Item("mtx1_DUMY").Specific;
oMatrix.LoadFromDataSource();
oMatrix = (SAPbouiCOM.Matrix)oForm.Items.Item("mtx2_DUMY").Specific;
oMatrix.Clear();
//oMatrix.LoadFromDataSource();
// 데이터 로드하면 메트릭스 선택된행 값 초기화 함.(중요)
gDeliverySelect = -1;
}
catch (Exception)
{
throw;
}
}
示例4: ET_CallBack_AFClick
public virtual void ET_CallBack_AFClick(ItemEvent pVal)
{
oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
oButton = ((SAPbouiCOM.Button)(oForm.Items.Item("CallBack").Specific));
// ADD YOUR ACTION CODE HERE ...
string popupID = string.Empty;
popupID = oButton.Caption.ToString();
if (string.IsNullOrEmpty(popupID)) return;
// 리턴 DataTable
SAPbouiCOM.DataTable rDT = KIS_SO0000F_HRD.GetReturnDT(popupID, oForm.UniqueID);
int rowIdx = KIS_SO0000F_HRD.GetSelectRowIdx(popupID, oForm.UniqueID);
oMatrix = (SAPbouiCOM.Matrix)oForm.Items.Item("mtx1_DUMY").Specific;
int idx = GetDataTableIndexByMatrix(oMatrix, rowIdx);
oDB_M = oForm.DataSources.DBDataSources.Item("@KIS_SO0030M_HRD");
switch (popupID)
{
case "DTL_지번주소":
oMatrix.SetCellWithoutValidation(rowIdx, "U_ADDR1", rDT.GetValue("RADDR_KOR", 0));
SetDeliveryDataApply(oForm, "U_ADDR1", rowIdx);
if (oForm.Mode == BoFormMode.fm_OK_MODE) oForm.Mode = BoFormMode.fm_UPDATE_MODE;
break;
case "DTL_거리주소":
oMatrix.SetCellWithoutValidation(rowIdx, "U_ADDR2", rDT.GetValue("RADDR_KOR", 0));
SetDeliveryDataApply(oForm, "U_ADDR2", rowIdx);
if (oForm.Mode == BoFormMode.fm_OK_MODE) oForm.Mode = BoFormMode.fm_UPDATE_MODE;
break;
case "MST_지번주소":
oDB_M.SetValue("U_ZIPCD1", 0, rDT.GetValue("ZIP_CD", 0));
oDB_M.SetValue("U_ADDR1", 0, rDT.GetValue("RADDR_KOR", 0));
if (oForm.Mode == BoFormMode.fm_OK_MODE) oForm.Mode = BoFormMode.fm_UPDATE_MODE;
break;
case "MST_거리주소":
oDB_M.SetValue("U_ZIPCD2", 0, rDT.GetValue("ZIP_CD", 0));
oDB_M.SetValue("U_ADDR2", 0, rDT.GetValue("RADDR_KOR", 0));
if (oForm.Mode == BoFormMode.fm_OK_MODE) oForm.Mode = BoFormMode.fm_UPDATE_MODE;
break;
case "접수내용":
rowIdx = int.Parse(oForm.DataSources.UserDataSources.Item("cRow").Value);
SetCallDataApply(oForm, "U_MEMO", rowIdx);
if (oForm.Mode == BoFormMode.fm_OK_MODE) oForm.Mode = BoFormMode.fm_UPDATE_MODE;
break;
case "선수금내역":
break;
default:
break;
}
}
示例5: GetDataLoad
private void GetDataLoad(SAPbouiCOM.Form oForm, string pCode)
{
oDB_M = oForm.DataSources.DBDataSources.Item("@KIS_SO0030M_HRD");
oDB1_O = oForm.DataSources.DBDataSources.Item("@KIS_SO00301_HRD");
oDB2_O = oForm.DataSources.DBDataSources.Item("@KIS_SO00302_HRD");
oDB1_Z = oForm.DataSources.DBDataSources.Item("@KIS_SO00301Z_HRD");
oDB2_Z = oForm.DataSources.DBDataSources.Item("@KIS_SO00302Z_HRD");
//헤더데이터를 조회
QueryWithConditions(ref oDB_M, "Code", pCode);
if (oDB_M.Size > 0)
{
//헤더를 기준으로 라인데이터 조회
QueryWithConditions(ref oDB1_O, "Code", pCode);
QueryWithConditions(ref oDB2_O, "Code", pCode);
SetSystemDataTable(oForm);
oForm.Mode = BoFormMode.fm_OK_MODE;
}
oMatrix = (SAPbouiCOM.Matrix)oForm.Items.Item("mtx1_ORIG").Specific;
oMatrix.LoadFromDataSource();
oMatrix = (SAPbouiCOM.Matrix)oForm.Items.Item("mtx2_ORIG").Specific;
oMatrix.LoadFromDataSource();
}
示例6: ET_mtx1_DUMY_BFChooseFromList
public virtual bool ET_mtx1_DUMY_BFChooseFromList(ItemEvent pVal)
{
oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
oMatrix = ((SAPbouiCOM.Matrix)(oForm.Items.Item("mtx1_DUMY").Specific));
// ADD YOUR ACTION CODE HERE ...
try
{
KIS_SO0000F_HRD KIS_SO0000F_HRD = new KIS_SO0000F_HRD();
switch (pVal.ColUID)
{
case "U_PAYCD":
SetConditionsPaymeny(oMatrix, pVal);
break;
case "U_CENTCD":
SetConditionsBranchCenter(oMatrix, pVal);
break;
//case "U_ADDR1":
// KIS_SO0000F_HRD.Act0_SubFormInit("DTL_지번주소", oForm.UniqueID, SO.SO_COMMON_HRD.ZipCodeTypes.Numberoflot, BoMatrixSelect.ms_Single, pVal.Row, "CallBack");
// return false;
//case "U_ADDR2":
// KIS_SO0000F_HRD.Act0_SubFormInit("DTL_거리주소", oForm.UniqueID, SO.SO_COMMON_HRD.ZipCodeTypes.Road, BoMatrixSelect.ms_Single, pVal.Row, "CallBack");
// return false;
default:
break;
}
}
catch (Exception ex)
{
B1Connections.theAppl.StatusBar.SetText(ex.Message, BoMessageTime.bmt_Short, BoStatusBarMessageType.smt_Error);
}
return true;
}
示例7: ET_mtx1_DUMY_BFMatrixLinkPressed
public virtual bool ET_mtx1_DUMY_BFMatrixLinkPressed(ItemEvent pVal)
{
oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
oMatrix = ((SAPbouiCOM.Matrix)(oForm.Items.Item("mtx1_DUMY").Specific));
// ADD YOUR ACTION CODE HERE ...
try
{
string KeyValue = string.Empty;
switch (pVal.ColUID)
{
case "U_SAILCD":
string strEmpNo = FN.GetMatirxCellValue(ref oMatrix, "U_SAILCD", pVal.Row);
// 사원번호로 사원마스터 키값을 조회한다.
string strUserId = GetEmployeeInfo(SO.SO_COMMON_HRD.QueryType_Employee.OHEM_Id, strEmpNo);
B1Connections.theAppl.OpenForm(BoFormObjectEnum.fo_Employee, null, strUserId);
return false;
case "U_PAYCD":
// 메모리에
SO.SO_COMMON_HRD.KeyValue = FN.GetMatirxCellValue(ref oMatrix, "U_PAYCD", pVal.Row);
B1Connections.theAppl.ActivateMenuItem("KIS_SO0050A_HRD");
return false;
default:
break;
}
}
catch (Exception ex)
{
B1Connections.theAppl.StatusBar.SetText(ex.Message, BoMessageTime.bmt_Short, BoStatusBarMessageType.smt_Error);
return false;
}
return true;
}
示例8: SetCallDataApply
public void SetCallDataApply(SAPbouiCOM.Form oForm, string pColID, int pRowID)
{
string strValue = string.Empty;
string strIDX = string.Empty;
string strRowStat = string.Empty;
try
{
oMatrix = (SAPbouiCOM.Matrix)oForm.Items.Item("mtx2_DUMY").Specific;
//oMatrix.FlushToDataSource();
strIDX = FN.GetMatirxCellValue(ref oMatrix, "U_IDX", pRowID); //DataTable 고유번호
strRowStat = gDs.Tables[oForm.UniqueID + "_Call"].Rows[int.Parse(strIDX)]["ROWSTATE"].ToString(); //Row상태값
switch (pColID)
{
case "U_DELVCD":
strValue = FN.GetMatirxCellValue(ref oMatrix, "U_DELVCD", pRowID); //배달코드
gDs.Tables[oForm.UniqueID + "_Call"].Rows[int.Parse(strIDX)]["DELVCD"] = strValue;
break;
case "U_CALLTP":
strValue = FN.GetMatirxCellValue(ref oMatrix, "U_CALLTP", pRowID); //콜유형
gDs.Tables[oForm.UniqueID + "_Call"].Rows[int.Parse(strIDX)]["CALLTP"] = strValue;
//불착(U20), 주소변경(U30) ,지로출력요청(U60) ,계산서출력(U70) :: N:미결
if (strValue == "U20" || strValue == "U30" || strValue == "U60" || strValue == "U70")
{
// 처리상태
oMatrix.SetCellWithoutValidation(pRowID, "U_PROSTAT", "N");
gDs.Tables[oForm.UniqueID + "_Call"].Rows[int.Parse(strIDX)]["PROSTAT"] = "N";
}
else
{
// 처리상태 , O완료 디폴트:(O 완료)
oMatrix.SetCellWithoutValidation(pRowID, "U_PROSTAT", "O");
gDs.Tables[oForm.UniqueID + "_Call"].Rows[int.Parse(strIDX)]["PROSTAT"] = "O";
}
break;
case "U_MEMO":
strValue = FN.GetMatirxCellValue(ref oMatrix, "U_MEMO", pRowID); //접수내용
gDs.Tables[oForm.UniqueID + "_Call"].Rows[int.Parse(strIDX)]["MEMO"] = strValue;
break;
case "U_RECVID":
strValue = FN.GetMatirxCellValue(ref oMatrix, "U_RECVID", pRowID); //접수자코드
gDs.Tables[oForm.UniqueID + "_Call"].Rows[int.Parse(strIDX)]["RECVID"] = strValue;
break;
case "U_RECVNM":
strValue = FN.GetMatirxCellValue(ref oMatrix, "U_RECVNM", pRowID); //접수자명
gDs.Tables[oForm.UniqueID + "_Call"].Rows[int.Parse(strIDX)]["RECVNM"] = strValue;
break;
case "U_PROCID":
strValue = FN.GetMatirxCellValue(ref oMatrix, "U_PROCID", pRowID); //처리자코드
gDs.Tables[oForm.UniqueID + "_Call"].Rows[int.Parse(strIDX)]["PROCID"] = strValue;
break;
case "U_PROCNM":
strValue = FN.GetMatirxCellValue(ref oMatrix, "U_PROCNM", pRowID); //처리자명
gDs.Tables[oForm.UniqueID + "_Call"].Rows[int.Parse(strIDX)]["PROCNM"] = strValue;
break;
case "U_RECVDT":
strValue = FN.GetMatirxCellValue(ref oMatrix, "U_RECVDT", pRowID); //상담일자
gDs.Tables[oForm.UniqueID + "_Call"].Rows[int.Parse(strIDX)]["RECVDT"] = strValue;
break;
case "U_RECVTI":
strValue = FN.GetMatirxCellValue(ref oMatrix, "U_RECVTI", pRowID); //상담시간
gDs.Tables[oForm.UniqueID + "_Call"].Rows[int.Parse(strIDX)]["RECVTI"] = strValue;
break;
case "U_PROCDT":
strValue = FN.GetMatirxCellValue(ref oMatrix, "U_PROCDT", pRowID); //처리일자
gDs.Tables[oForm.UniqueID + "_Call"].Rows[int.Parse(strIDX)]["PROCDT"] = strValue;
break;
case "U_PROSTAT":
strValue = FN.GetMatirxCellValue(ref oMatrix, "U_PROSTAT", pRowID); //처리상태
gDs.Tables[oForm.UniqueID + "_Call"].Rows[int.Parse(strIDX)]["PROSTAT"] = strValue;
break;
default:
break;
}
DateTime deDate = B1Connections.diCompany.GetCompanyDate();
string strDate = deDate.ToShortDateString();
string U_RECVTI = B1Connections.diCompany.GetCompanyTime().Replace(":", "");//임포트 실행시간
// 최초 등록일때만 처리자 및 처리일자 등록
if (strRowStat == "I")
{
//.........这里部分代码省略.........
示例9: ET_mtx1_DUMY_BFRightClick
public virtual bool ET_mtx1_DUMY_BFRightClick(ContextMenuInfo pVal)
{
oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
oMatrix = ((SAPbouiCOM.Matrix)(oForm.Items.Item("mtx1_DUMY").Specific));
// ADD YOUR ACTION CODE HERE ...
if (oForm.Mode == BoFormMode.fm_ADD_MODE || oForm.Mode == BoFormMode.fm_UPDATE_MODE || oForm.Mode == BoFormMode.fm_OK_MODE)
{
if ((oMatrix.VisualRowCount > 0) && (pVal.Row > 0))
oForm.EnableMenu("1293", true);//행삭제
else
oForm.EnableMenu("1293", false);//행삭제
oForm.EnableMenu("1292", true);//행추가
gRowIdx = pVal.Row;
gSelMtx = pVal.ItemUID;
}
return true;
}
示例10: SetDeliveryDataApply
private void SetDeliveryDataApply(SAPbouiCOM.Form oForm, string pColID, int pRowID)
{
string strValue = string.Empty;
string strIDX = string.Empty;
string strRowStat = string.Empty;
StringBuilder sb = null;
try
{
oMatrix = (SAPbouiCOM.Matrix)oForm.Items.Item("mtx1_DUMY").Specific;
//oMatrix.FlushToDataSource();
int idx = GetDataTableIndexByMatrix(oMatrix, pRowID);
strRowStat = gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["ROWSTATE"].ToString(); //Row상태값
switch (pColID)
{
case "U_DELVCD":
strValue = FN.GetMatirxCellValue(ref oMatrix, "U_DELVCD", pRowID); //배달코드
gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["DELVCD"] = strValue;
break;
case "U_RDEPT":
strValue = FN.GetMatirxCellValue(ref oMatrix, "U_RDEPT", pRowID); //부서
gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["RDEPT"] = strValue;
break;
case "U_PAPERTP":
strValue = FN.GetMatirxCellValue(ref oMatrix, "U_PAPERTP", pRowID); //지종
gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["PAPERTP"] = strValue;
break;
case "U_READTP":
strValue = FN.GetMatirxCellValue(ref oMatrix, "U_READTP", pRowID); //독자구분
gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["READTP"] = strValue;
break;
case "U_PAYCD":
strValue = FN.GetMatirxCellValue(ref oMatrix, "U_PAYCD", pRowID); //요금제코드
gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["PAYCD"] = strValue;
if (string.IsNullOrEmpty(strValue))
{
oMatrix.SetCellWithoutValidation(pRowID, "U_PAYNM", "");
gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["PAYNM"] = "";
}
break;
case "U_PAYNM":
strValue = FN.GetMatirxCellValue(ref oMatrix, "U_PAYNM", pRowID); //요금제명
gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["PAYNM"] = strValue;
break;
case "U_TEL":
strValue = FN.GetMatirxCellValue(ref oMatrix, "U_TEL", pRowID); //연락처
gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["TEL"] = strValue;
break;
case "U_MOBILE":
strValue = FN.GetMatirxCellValue(ref oMatrix, "U_MOBILE", pRowID); //휴대폰
gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["MOBILE"] = strValue;
break;
case "U_ADDR1":
strValue = FN.GetMatirxCellValue(ref oMatrix, "U_ADDR1", pRowID); //주소1
gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["ADDR1"] = strValue;
break;
case "U_ADDR2":
strValue = FN.GetMatirxCellValue(ref oMatrix, "U_ADDR2", pRowID); //주소2
gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["ADDR2"] = strValue;
break;
case "U_ADDR1_D":
strValue = FN.GetMatirxCellValue(ref oMatrix, "U_ADDR1_D", pRowID); //주소1
gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["ADDR1_D"] = strValue;
break;
case "U_ADDR2_D":
strValue = FN.GetMatirxCellValue(ref oMatrix, "U_ADDR2_D", pRowID); //주소2
gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["ADDR2_D"] = strValue;
break;
case "U_CENTCD":
strValue = FN.GetMatirxCellValue(ref oMatrix, "U_CENTCD", pRowID); //지국
gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["CENTCD"] = strValue;
if (string.IsNullOrEmpty(strValue))
{
oMatrix.SetCellWithoutValidation(pRowID, "U_CENTNM", "");
gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["CENTNM"] = "";
}
break;
case "U_CENTNM":
strValue = FN.GetMatirxCellValue(ref oMatrix, "U_CENTNM", pRowID); //지국명
//.........这里部分代码省略.........
示例11: Act3_DefualtSetting
/// <summary>
/// 폼(Form) 및 아이템들(Items)의 기본값으로 설정되야하는 항목들을 정의합니다.
/// </summary>
private void Act3_DefualtSetting(SAPbouiCOM.Form oForm, string pStrPFormUID, string pCODE)
{
try
{
//oForm.UniqueID + "_Deliver" = oForm.UniqueID + "_Deliver";
//oForm.UniqueID + "_Call" = oForm.UniqueID + "_Call";
oForm.DataSources.UserDataSources.Item("pFORMUID").Value = pStrPFormUID;
oMatrix = (SAPbouiCOM.Matrix)oForm.Items.Item("mtx1_ORIG").Specific;
oMatrix.SelectionMode = BoMatrixSelect.ms_NotSupported;
oMatrix = (SAPbouiCOM.Matrix)oForm.Items.Item("mtx2_ORIG").Specific;
oMatrix.SelectionMode = BoMatrixSelect.ms_NotSupported;
// '// ADD YOUR ACTION CODE HERE ...
//메트릭스 첫줄 선택시 팝업박스 뜨는것 막는다.
oForm.Settings.EnableRowFormat = false;
oMatrix = (SAPbouiCOM.Matrix)oForm.Items.Item("mtx1_DUMY").Specific;
oMatrix.SelectionMode = BoMatrixSelect.ms_NotSupported;
// 지종
FN.SetComboBoxValidValues(oMatrix, "U_PAPERTP", " SELECT U_SMLCD, U_SMLNM FROM [@KIS_AD00201] WHERE Code = 'SO01' ", FN.Enum_WholeTp.m_Nothing);
// 독자구분
FN.SetComboBoxValidValues(oMatrix, "U_READTP", " SELECT U_SMLCD, U_SMLNM FROM [@KIS_AD00201] WHERE Code = 'SO08' ", FN.Enum_WholeTp.m_Nothing);
// 배달 상태
FN.SetComboBoxValidValues(oMatrix, "U_STATUS", " SELECT U_SMLCD, U_SMLNM FROM [@KIS_AD00201] WHERE Code = 'SO13' ", FN.Enum_WholeTp.m_Nothing);
// 배달 가입방법
FN.SetComboBoxValidValues(oMatrix, "U_METHOD", " SELECT U_SMLCD, U_SMLNM FROM [@KIS_AD00201] WHERE Code = 'SO14' ", FN.Enum_WholeTp.m_Nothing);
oMatrix = (SAPbouiCOM.Matrix)oForm.Items.Item("mtx2_DUMY").Specific;
oMatrix.SelectionMode = BoMatrixSelect.ms_NotSupported;
gCallTp_IDX = FN.GetColumnIndex(oMatrix, "U_CALLTP");
gComment_IDX = FN.GetColumnIndex(oMatrix, "U_MEMO");
// 콜유형
FN.SetComboBoxValidValues(oMatrix, "U_CALLTP", " SELECT U_SMLCD, U_SMLNM FROM [@KIS_AD00201] WHERE Code = 'SO12' ", FN.Enum_WholeTp.m_Nothing);
oDB_M = oForm.DataSources.DBDataSources.Item("@KIS_SO0030M_HRD");
oDB1_O = oForm.DataSources.DBDataSources.Item("@KIS_SO00301_HRD");
oDB2_O = oForm.DataSources.DBDataSources.Item("@KIS_SO00302_HRD");
oDB1_Z = oForm.DataSources.DBDataSources.Item("@KIS_SO00301Z_HRD");
oDB2_Z = oForm.DataSources.DBDataSources.Item("@KIS_SO00302Z_HRD");
System.Data.DataTable dt_DELIVER = SetParameterDataTableSchema(oForm.UniqueID + "_Deliver");
System.Data.DataTable dt_CALL = SetParameterDataTableSchema(oForm.UniqueID + "_Call");
gDs.Tables.AddRange(new System.Data.DataTable[] { dt_DELIVER, dt_CALL });
// 독자그룹
FN.SetComboBoxValidValues(oForm, " SELECT U_SMLCD, U_SMLNM FROM [@KIS_AD00201] WHERE Code = 'SO03' ", "cboCATEGP1", FN.Enum_WholeTp.m_Space, "");
FN.SetComboBoxValidValues(oForm, " SELECT U_SMLCD, U_SMLNM FROM [@KIS_AD00201] WHERE Code = 'SO04' ", "cboCATEGP2", FN.Enum_WholeTp.m_Space, "");
FN.SetComboBoxValidValues(oForm, " SELECT U_SMLCD, U_SMLNM FROM [@KIS_AD00201] WHERE Code = 'SO05' ", "cboCATEGP3", FN.Enum_WholeTp.m_Space, "");
FN.SetComboBoxValidValues(oForm, " SELECT U_SMLCD, U_SMLNM FROM [@KIS_AD00201] WHERE Code = 'SO06' ", "cboCATEGP4", FN.Enum_WholeTp.m_Space, "");
//문서상태 : 테이블 기본값에 지정함
//계산서발행
FN.SetComboBoxValidValues(oForm, " SELECT U_SMLCD, U_SMLNM FROM [@KIS_AD00201] WHERE Code = 'SO15' ", "cboVATGRUP", FN.Enum_WholeTp.m_Nothing);
//은행
FN.SetComboBoxValidValues(oForm, " SELECT U_CD, U_SMLNM FROM [@KIS_AD00201] WHERE Code = 'SO40' AND U_USEYN = 'Y' ", "cboBANKNM", FN.Enum_WholeTp.m_Space, "");
//신용카드
FN.SetComboBoxValidValues(oForm, " SELECT U_CD, U_SMLNM FROM [@KIS_AD00201] WHERE Code = 'SO52' AND U_USEYN = 'Y' ", "cboCREDTBP", FN.Enum_WholeTp.m_Space, "");
// 지종 2014-08-27
FN.SetComboBoxValidValues(oForm, " SELECT U_SMLCD, U_SMLNM FROM [@KIS_AD00201] WHERE Code = 'SO01' ", "cboPAPERCD", FN.Enum_WholeTp.m_Space, "");
// 납부방법
FN.SetComboBoxValidValues(oForm, " SELECT U_SMLCD, U_SMLNM FROM [@KIS_AD00201] WHERE Code = 'SO09' ", "cboPAY_TP1", FN.Enum_WholeTp.m_Space, "");
FN.SetComboBoxValidValues(oForm, " SELECT U_SMLCD, U_SMLNM FROM [@KIS_AD00201] WHERE Code = 'SO09' ", "cboPAY_TP2", FN.Enum_WholeTp.m_Space, "");
// 선납/후납
FN.SetComboBoxValidValues(oForm, " SELECT U_SMLCD, U_SMLNM FROM [@KIS_AD00201] WHERE Code = 'SO10' ", "cboADVPOST", FN.Enum_WholeTp.m_Space, "");
// 납부시기
FN.SetComboBoxValidValues(oForm, " SELECT U_SMLCD, U_SMLNM FROM [@KIS_AD00201] WHERE Code = 'SO11' ", "cboPAYINST", FN.Enum_WholeTp.m_Space, "");
// 배달상태
FN.SetComboBoxValidValues(oForm, " SELECT U_SMLCD, U_SMLNM FROM [@KIS_AD00201] WHERE Code = 'SO13' ", "cboF_STATU", FN.Enum_WholeTp.m_Space, "");
// 직업
FN.SetComboBoxValidValues(oForm, " SELECT U_SMLCD, U_SMLNM FROM [@KIS_AD00201] WHERE Code = 'SO55' ", "cboJOB", FN.Enum_WholeTp.m_Space, "");
// 신용카드인증키 발급구분
FN.SetComboBoxValidValues(oForm, " SELECT U_SMLCD, U_SMLNM FROM [@KIS_AD00201] WHERE Code = 'SO56' ", "cboCREDREQ", FN.Enum_WholeTp.m_Space, "");
oForm.DataBrowser.BrowseBy = "DocEntry";
//.........这里部分代码省略.........
示例12: DataToDbDataSource_CALL
private bool DataToDbDataSource_CALL(SAPbouiCOM.Form oForm)
{
bool rtnValue = false;
try
{
oDB2_O = oForm.DataSources.DBDataSources.Item("@KIS_SO00302_HRD");
oMatrix = (SAPbouiCOM.Matrix)oForm.Items.Item("mtx2_ORIG").Specific;
/*
// 1. 메트릭스 삭제대상 삭제 적용
var objDelete = from row in gDs.Tables[oForm.UniqueID + "_Call"].AsEnumerable()
where row.Field<string>("ROWSTATE") == "D"
select new
{
vIDX = row.Field<Int32>("IDX") + 1
};
foreach (var itemSub in objDelete)
{
//삭제할것들 선택한다.
oMatrix.SelectRow(itemSub.vIDX, true, true);
}
// 선택된 Rows를 삭제한다.
int iSelectIdx = 0;
while (iSelectIdx != -1)
{
iSelectIdx = oMatrix.GetNextSelectedRow(0, BoOrderType.ot_SelectionOrder);
if (iSelectIdx != -1)
oMatrix.DeleteRow(iSelectIdx);
}
if (objDelete.Count() > 0)
oMatrix.FlushToDataSource();
* */
var objModify = from row in gDs.Tables[oForm.UniqueID + "_Call"].AsEnumerable()
where row.Field<string>("ROWSTATE") == "M" || row.Field<string>("ROWSTATE") == "I"
orderby row.Field<Int32>("IDX") descending
select new
{
vIDX = row.Field<Int32>("IDX")
,
vDELVCD = row.Field<string>("DELVCD")
,
vCALLTP = row.Field<string>("CALLTP")
,
vMEMO = row.Field<string>("MEMO")
,
vRECVID = row.Field<string>("RECVID")
,
vRECVNM = row.Field<string>("RECVNM")
,
vRECVDT = row.Field<string>("RECVDT")
,
vRECVTI = row.Field<string>("RECVTI")
,
vPROCID = row.Field<string>("PROCID")
,
vPROCNM = row.Field<string>("PROCNM")
,
vPROCDT = row.Field<string>("PROCDT")
,
vPROSTAT = row.Field<string>("PROSTAT")
,
vROWSTATE = row.Field<string>("ROWSTATE")
};
foreach (var itemSub in objModify)
{
if (itemSub.vROWSTATE == "I")
SetDbDataSourceAddRow(ref oForm, ref oMatrix, ref oDB2_O, "U_DELVCD");
oDB2_O.SetValue("U_DELVCD", itemSub.vIDX, itemSub.vDELVCD);
oDB2_O.SetValue("U_CALLTP", itemSub.vIDX, itemSub.vCALLTP);
oDB2_O.SetValue("U_MEMO", itemSub.vIDX, itemSub.vMEMO);
oDB2_O.SetValue("U_RECVID", itemSub.vIDX, itemSub.vRECVID);
oDB2_O.SetValue("U_RECVNM", itemSub.vIDX, itemSub.vRECVNM);
oDB2_O.SetValue("U_RECVDT", itemSub.vIDX, itemSub.vRECVDT);
oDB2_O.SetValue("U_RECVTI", itemSub.vIDX, itemSub.vRECVTI);
oDB2_O.SetValue("U_PROCID", itemSub.vIDX, itemSub.vPROCID);
oDB2_O.SetValue("U_PROCNM", itemSub.vIDX, itemSub.vPROCNM);
oDB2_O.SetValue("U_PROCDT", itemSub.vIDX, itemSub.vPROCDT);
oDB2_O.SetValue("U_PROSTAT", itemSub.vIDX, itemSub.vPROSTAT);
}
if (objModify.Count() > 0)
oMatrix.LoadFromDataSource();
rtnValue = true;
}
catch (Exception)
{
throw;
}
return rtnValue;
}
示例13: DataToDbDataSource_DELIVER
private bool DataToDbDataSource_DELIVER(SAPbouiCOM.Form oForm)
{
bool rtnValue = false;
try
{
oDB1_O = oForm.DataSources.DBDataSources.Item("@KIS_SO00301_HRD");
oMatrix = (SAPbouiCOM.Matrix)oForm.Items.Item("mtx1_ORIG").Specific;
oMatrix.FlushToDataSource();
/*
// 1. 메트릭스 삭제대상 삭제 적용
var objDelete = from row in gDs.Tables[oForm.UniqueID + "_Deliver"].AsEnumerable()
where row.Field<string>("ROWSTATE") == "D"
select new
{
vIDX = row.Field<Int32>("IDX") +1
};
foreach (var itemSub in objDelete)
{
//삭제할것들 선택한다.
oMatrix.SelectRow(itemSub.vIDX, true, true);
}
// 선택된 Rows를 삭제한다.
int iSelectIdx = 0;
while (iSelectIdx != -1)
{
iSelectIdx = oMatrix.GetNextSelectedRow(0, BoOrderType.ot_SelectionOrder);
if (iSelectIdx != -1)
oMatrix.DeleteRow(iSelectIdx);
}
if(objDelete.Count() > 0)
oMatrix.FlushToDataSource();
*/
// 2. 수정, 추가된내역 적용
var objModify = from row in gDs.Tables[oForm.UniqueID + "_Deliver"].AsEnumerable()
where row.Field<string>("ROWSTATE") == "M" || row.Field<string>("ROWSTATE") == "I"
select new
{
vIDX = row.Field<Int32>("IDX")
,
vDELVCD = row.Field<string>("DELVCD")
,
vRDEPT = row.Field<string>("RDEPT")
,
vPAPERTP = row.Field<string>("PAPERTP")
,
vPAYCD = row.Field<string>("PAYCD")
,
vPAYNM = row.Field<string>("PAYNM")
,
vTEL = row.Field<string>("TEL")
,
vMOBILE = row.Field<string>("MOBILE")
,
vADDR1 = row.Field<string>("ADDR1")
,
vADDR2 = row.Field<string>("ADDR2")
,
vADDR1_D = row.Field<string>("ADDR1_D")
,
vADDR2_D = row.Field<string>("ADDR2_D")
,
vCENTCD = row.Field<string>("CENTCD")
,
vCENTNM = row.Field<string>("CENTNM")
,
vDELVFR = row.Field<string>("DELVFR")
,
vDELVTO = row.Field<string>("DELVTO")
,
vDELVCNT = row.Field<Int32>("DELVCNT")
,
vMETHOD = row.Field<string>("METHOD")
,
vSAILCD = row.Field<string>("SAILCD")
,
vSAILNM = row.Field<string>("SAILNM")
,
vSDEPT = row.Field<string>("SDEPT")
,
vSTATUS = row.Field<string>("STATUS")
,
vNOTE = row.Field<string>("NOTE")
,
vJOINDT = row.Field<string>("JOINDT")
,
vCLOSEDT = row.Field<string>("CLOSEDT")
,
vUSERSG1 = row.Field<string>("USERSG1")
,
vREADTP = row.Field<string>("READTP")
,
vBTEL1 = row.Field<string>("BTEL1")
,
vBTEL2 = row.Field<string>("BTEL2")
,
vROWSTATE = row.Field<string>("ROWSTATE")
//.........这里部分代码省略.........
示例14: ET_mtx2_DUMY_AFComboSelect
public virtual void ET_mtx2_DUMY_AFComboSelect(ItemEvent pVal)
{
oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
oMatrix = ((SAPbouiCOM.Matrix)(oForm.Items.Item("mtx2_DUMY").Specific));
// ADD YOUR ACTION CODE HERE ...
if (pVal.InnerEvent == false && pVal.ItemChanged == true)
SetCallDataApply(oForm, pVal.ColUID, pVal.Row);
}
示例15: ET_AFRowDataMenu_Delete
public virtual void ET_AFRowDataMenu_Delete(MenuEvent pVal)
{
oForm = B1Connections.theAppl.Forms.ActiveForm;
// ADD YOUR ACTION CODE HERE ...
try
{
oMatrix = (SAPbouiCOM.Matrix)oForm.Items.Item(gSelMtx).Specific;
oForm.Freeze(true);
oMatrix.AddRow(1, -1);
int i = oMatrix.VisualRowCount;
oMatrix.DeleteRow(i);
oMatrix.FlushToDataSource();
if (gSelMtx == "mtx1_DUMY")
{
gDeliverySelect = -1;
// 1. 삭제된뒤 DataTable의 Index값을 다시 설정한다.
SetDataTableReIndexing_Deliver();
// 2. 다시 DataTable 기준으로 화면에 조회한다.
FindData(oForm);
}
else
{
// 1. 삭제된뒤 DataTable의 Index값을 다시 설정한다.
SetDataTableReIndexing_Call();
// 2. 다시 DataTable 기준으로 화면에 조회한다.
FindSubData(oForm, GetSelectedMatrixRowIndex(oForm));
}
oForm.Freeze(false);
}
catch (Exception)
{
throw;
}
}